code: def get_imported_repo(self, import_path):
      
      try:
        session = requests.session()
        # TODO: Support https with (optional) fallback to http, as Go does.
        # See https://github.com/pantsbuild/pants/issues/3503.
        session.mount("http://",
                      requests.adapters.HTTPAdapter(max_retries=self.get_options().retries))
        page_data = session.get('http://{import_path}?go-get=1'.format(import_path=import_path))
      except requests.ConnectionError:
        return None
  
      if not page_data:
        return None
  
      # Return the first match, rather than doing some kind of longest prefix search.
      # Hopefully no one returns multiple valid go-import meta tags.
      for (root, vcs, url) in self.find_meta_tags(page_data.text):
        if root and vcs and url:
          # Check to make sure returned root is an exact match to the provided import path. If it is
          # not then run a recursive check on the returned and return the values provided by that call.
          if root == import_path:
            return ImportedRepo(root, vcs, url)
          elif import_path.startswith(root):
            return self.get_imported_repo(root)
  
      return None
docs: Looks for a go-import meta tag for the provided import_path.
  
      Returns an ImportedRepo instance with the information in the meta tag,
      or None if no go-import meta tag is found.