class_docstr: Method descriptor with partial application of the given arguments
  and keywords.
  
  Supports wrapping existing descriptors and handles non-descriptor
  callables as instance methods.
class_docstr_tok: ["Method","descriptor","with","partial","application","of","the","given","arguments","and","keywords",".","Supports","wrapping","existing","descriptors","and","handles","non-descriptor","callables","as","instance","methods","."]
code: def __get__(self, obj, cls=None):
      get = getattr(self.func, "__get__", None)
      result = None
      if get is not None:
          new_func = get(obj, cls)
          if new_func is not self.func:
              # Assume __get__ returning something new indicates the
              # creation of an appropriate callable
              result = partial(new_func, *self.args, **self.keywords)
              try:
                  result.__self__ = new_func.__self__
              except AttributeError:
                  pass
      if result is None:
          # If the underlying descriptor didn't do anything, treat this
          # like an instance method
          result = self._make_unbound_method().__get__(obj, cls)
      return result
  
imports: from abc import get_cache_token
  from collections import namedtuple
  from reprlib import recursive_repr
  from _thread import RLock
label_desc: Use image node_id 4 for calling the partialmethod obj's underlying member method code with example usage: obj.__get__(obj, cls) and returns: result