Fully qualified name for 'builtin_function_or_method' objects
    in Python 2.

def _fullqualname_builtin_py2(obj):
    """Fully qualified name for 'builtin_function_or_method' objects
    in Python 2.
    """

    if obj.__self__ is None:
        # built-in functions
        module = obj.__module__
        qualname = obj.__name__
    else:
        # built-in methods
        if inspect.isclass(obj.__self__):
            cls = obj.__self__
        else:
            cls = obj.__self__.__class__
        module = cls.__module__
        qualname = cls.__name__ + '.' + obj.__name__

    return module + '.' + qualname