code: def linkcode_resolve(domain, info):
      
      if domain != 'py':
          return None
  
      modname = info['module']
      fullname = info['fullname']
  
      submod = sys.modules.get(modname)
      if submod is None:
          return None
  
      obj = submod
      for part in fullname.split('.'):
          try:
              obj = getattr(obj, part)
          except:
              return None
  
      try:
          fn = inspect.getsourcefile(obj)
      except:
          fn = None
      if not fn:
          return None
  
      try:
          source, lineno = inspect.getsourcelines(obj)
      except:
          lineno = None
  
      if lineno:
          linespec = "#L%d-L%d" % (lineno, lineno + len(source) - 1)
      else:
          linespec = ""
  
      filename = info['module'].replace('.', '/')
      return "http://github.com/allenai/allennlp/blob/master/%s.py%s" % (filename, linespec)
docs: Determine the URL corresponding to Python object
      This code is from
      https://github.com/numpy/numpy/blob/master/doc/source/conf.py#L290
      and https://github.com/Lasagne/Lasagne/pull/262