<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _unpickle_method(func_name, obj, cls):
 """Unpickle methods properly, including class methods."""


  if obj is None:
    return cls.__dict__[func_name].__get__(obj, cls)
  for cls in cls.__mro__:
    try:
      func = cls.__dict__[func_name]
    except KeyError:
      pass
    else:
      break
  return func.__get__(obj, cls)