def METHOD_NAME(mod, cls):
    obj = importlib.import_module(mod)
    if cls:
        obj = getattr(obj, cls)
        return obj, ":meth:`{}.{}.{{}}`".format(mod, cls)
    else:
        # ufunc is not a function
        return obj, ":obj:`{}.{{}}`".format(mod)