def unwrap_method(method):
    """Return the function object for the given method object."""
    try:
        # Python 2
        return method.im_func
    except __HOLE__:
        try:
            # Python 3
            return method.__func__
        except AttributeError:
            # Not a method.
            return method
dataset/ETHPy150Open SimonSapin/Frozen-Flask/flask_frozen/__init__.py/unwrap_method