Returns the underlying function that will be called by the () operator.

        * For regular functions, returns ``callable``
        * For bound methods, returns ``callable.im_func``
        * For unbound methods, returns ``callable.__func__``
        * For classes, returns ``callable.__init__.__func__``.
        * For callable objects, returns ``callable.__call__.im_func``.

def get_fn(callable):
    """Returns the underlying function that will be called by the () operator.

        * For regular functions, returns ``callable``
        * For bound methods, returns ``callable.im_func``
        * For unbound methods, returns ``callable.__func__``
        * For classes, returns ``callable.__init__.__func__``.
        * For callable objects, returns ``callable.__call__.im_func``.

    """
    if _inspect.isfunction(callable):
        return callable
    if _inspect.ismethod(callable):
        try:
            return callable.__func__
        except AttributeError:
            return callable.__func__
    if _inspect.isclass(callable):
        return callable.__init__.__func__
    if hasattr(callable, '__call__'):
        return callable.__call__.__func__
    return callable