def METHOD_NAME(f):
    """
    Get an identifier for a function or method
    """
    joinchar = "."
    if hasattr(f, "im_class"):
        fparent = f.im_class.__name__
    else:
        joinchar = ":"
        fparent = f.__module__.split(".")[-1]
    # sometimes inspect.getsourcelines() segfaults on windows
    if getattr(sys, "frozen", False) or sys.platform == "win32":
        lineno = 0
    else:
        lineno = inspect.getsourcelines(f)[1]
    fullname = joinchar.join((fparent, f.__name__))
    return ":".join((fullname, str(lineno)))