import inspect


def get_signature(obj):
    """
    Get signature of module/class/routine

    Returns:
        A string signature
    """
    name = obj.__name__
    if inspect.isclass(obj):
        if hasattr(obj, "__init__"):
            signature = str(inspect.signature(obj.__init__))
            return "class %s%s" % (name, signature)
        else:
            signature = "%s()" % name
    elif inspect.ismodule(obj):
        signature = name
    else:
        signature = str(inspect.signature(obj))
        return name + signature
    return signature