from anchor_class import Anchor, leak_private_methods class First(Anchor): def __init__(self, value): self.value = value def __increment(self): """ THIS METHOD IS PRIVATE """ self.value += 1 # First's increment method is private and increase First.value by 1 Second = leak_private_methods(First) # now First's increment method is public. instance = Second(0) # initial value of First.value has been set to 0 instance.increment() # First.increment has been called and First.value has been incremented print(f'Worked: {instance.value == 1}')