code: def retrieve_and_parse_diaspora_webfinger(handle):
      
      try:
          host = handle.split("@")[1]
      except AttributeError:
          logger.warning("retrieve_and_parse_diaspora_webfinger: invalid handle given: %s", handle)
          return None
      document, code, exception = fetch_document(
          host=host, path="/.well-known/webfinger?resource=acct:%s" % quote(handle),
      )
      if document:
          return parse_diaspora_webfinger(document)
      hostmeta = retrieve_diaspora_host_meta(host)
      if not hostmeta:
          return None
      url = hostmeta.find_link(rels="lrdd").template.replace("{uri}", quote(handle))
      document, code, exception = fetch_document(url)
      if exception:
          return None
      return parse_diaspora_webfinger(document)
docs: Retrieve a and parse a remote Diaspora webfinger document.
  
      :arg handle: Remote handle to retrieve
      :returns: dict