def _instance_overrides_method(base, instance, method_name):
 bound_method = getattr(instance, method_name)
 unbound_method = getattr(base, method_name)
 return (six.get_unbound_function(unbound_method) != six.get_method_function(bound_method))

def _instance_overrides_method ( base , instance , method_name ) : bound_method = getattr ( instance , method_name ) unbound_method = getattr ( base , method_name ) return ( six . get_unbound_function ( unbound_method ) != six . get_method_function ( bound_method ) )
returns true if instance overrides a method inherited from base .