parameters: (obj, name, f)
docstring: Patch the method of a class.
docstring_summary: Patch the method of a class.
docstring_tokens: Patch the method of a class .
function: def patch(obj, name, f):
      """Patch the method of a class."""
      original = getattr(obj, name)
  
      def method(*args, **kwargs):
          return f(original, *args, **kwargs)
  
      setattr(obj, name, method)
function_tokens: def patch ( obj , name , f ) : original = getattr ( obj , name ) def method ( * args , * * kwargs ) : return f ( original , * args , * * kwargs ) setattr ( obj , name , method )