code: def get_class_method(cls_or_inst, method_name):
      
      cls = cls_or_inst if isinstance(cls_or_inst, type) else cls_or_inst.__class__
      meth = getattr(cls, method_name, None)
      if isinstance(meth, property):
          meth = meth.fget
      elif isinstance(meth, cached_property):
          meth = meth.func
      return meth
docs: Returns a method from a given class or instance. When the method doest not exist, it returns `None`. Also works with
      properties and cached properties.