def METHOD_NAME(domain, info):
    """Determine the URL corresponding to Python object."""
    if domain != 'py':
        return
    modname = info['module']
    fullname = info['fullname']
    submod = sys.modules.get(modname)
    if submod is None:
        return
    obj = submod
    for part in fullname.split('.'):
        try:
            obj = getattr(obj, part)
        except AttributeError:
            return
    # strip decorators, which would resolve to the source of the decorator
    # possibly an upstream bug in getsourcefile, bpo-1764286
    try:
        unwrap = inspect.unwrap
    except AttributeError:
        pass
    else:
        obj = unwrap(obj)
    try:
        fn = inspect.getsourcefile(obj)
    except TypeError:
        fn = None
    if not fn:
        return
    try:
        source, lineno = inspect.getsourcelines(obj)
    except OSError:
        lineno = None
    if lineno:
        linespec = f'#L{lineno:d}-L{lineno + len(source) - 1:d}'
    else:
        linespec = ''
    fn = os.path.relpath(fn, start=os.path.dirname(diofant.__file__))
    blobpath = 'https://github.com/diofant/diofant/blob/'
    if 'dev' in version:
        return blobpath + f'master/diofant/{fn}{linespec}'
    else:
        return blobpath + f'v{version}/diofant/{fn}{linespec}'