def METHOD_NAME():
    """
    Get logger defined in caller's environment
    :return: logger instance (or None if none was found)
    """
    logger_cls = logging.getLoggerClass()
    if __debug__:
        frame = inspect.currentframe()
    else:
        frame = None
    logger = None
    # frame may be None, see https://docs.python.org/2/library/inspect.html#inspect.currentframe
    if frame is not None:
        try:
            # consider calling stack in reverse order, i.e. most inner frame (closest to caller) first
            for frameinfo in inspect.getouterframes(frame)[::-1]:
                bindings = inspect.getargvalues(frameinfo[0]).locals
                for val in bindings.values():
                    if isinstance(val, logger_cls):
                        logger = val
                        break
        finally:
            # make very sure that reference to frame object is removed, to avoid reference cycles
            # see https://docs.python.org/2/library/inspect.html#the-interpreter-stack
            del frame
    return logger