def linkcode_resolve(domain, info):
    def find_source():
        # try to find the file and line number, based on code from numpy:
        # https://github.com/numpy/numpy/blob/master/doc/source/conf.py#L286
        obj = sys.modules[info['module']]
        for part in info['fullname'].split('.'):
            obj = getattr(obj, part)

        import inspect
        import os
        fn = inspect.getsourcefile(obj)
        fn = os.path.relpath(fn, os.path.dirname(hmmlearn.__file__))
        source, lineno = inspect.getsourcelines(obj)
        return fn, lineno, lineno + len(source) - 1

    try:
        filename = 'hmmlearn/%s#L%d-L%d' % find_source()
    except Exception:
        return None  # Failed to resolve source or line numbers.

    return linkcode_base_url + "%s/%s" % (tag, filename)

# -- Options for HTML output -------------------------------------------------

## Read the docs style:
dataset/ETHPy150Open hmmlearn/hmmlearn/doc/conf.py/linkcode_resolve/original