Find a Pointcut ctx which is a class/instance related to input
    function/method.

    :param elt: elt from where find a ctx.
    :return: elt ctx. None if no ctx available or if elt is a None method.

def find_ctx(elt):
    """Find a Pointcut ctx which is a class/instance related to input
    function/method.

    :param elt: elt from where find a ctx.
    :return: elt ctx. None if no ctx available or if elt is a None method.
    """

    result = None

    if ismethod(elt):

        result = elt.__self__

        if result is None and PY2:
            result = elt.im_class

    elif isclass(elt):
        result = elt

    return result