I need to extend an external class to my (It's a class of a package from PyPI).
This class has a method which define a function inside it:
class MyClass(object):
def mymethod(self, *args, **kwargs):
def aux_function(self, params):
# Do something
# Do something and call aux_function
I want to override the aux_function inside the instance method but I want to keep the rest of the code inside the method.
Is there any way to override the function inside the method and use super() to run the code from the original class?