Return fully qualified name from object

def fully_qualified_name(obj, sep='.'):
    """Return fully qualified name from object"""
    if inspect.isclass(obj):
        return obj.__module__ + sep + obj.__name__
    else:
        return obj.__module__ + sep + obj.__class__.__name__