code: def receiveds_parsing(receiveds):
      
  
      parsed = []
      receiveds = [re.sub(JUNK_PATTERN, " ", i).strip() for i in receiveds]
      n = len(receiveds)
      log.debug("Nr. of receiveds. {}".format(n))
  
      for idx, received in enumerate(receiveds):
          log.debug("Parsing received {}/{}".format(idx + 1, n))
          log.debug("Try to parse {!r}".format(received))
          try:
              # try to parse the current received header...
              values_by_clause = parse_received(received)
          except MailParserReceivedParsingError:
              # if we can't, let's append the raw
              parsed.append({'raw': received})
          else:
              # otherwise append the full values_by_clause dict
              parsed.append(values_by_clause)
  
      log.debug("len(receiveds) %s, len(parsed) %s" % (
          len(receiveds), len(parsed)))
  
      if len(receiveds) != len(parsed):
          # something really bad happened,
          # so just return raw receiveds with hop indices
          log.error("len(receiveds): %s, len(parsed): %s, receiveds: %s, \
              parsed: %s" % (len(receiveds), len(parsed), receiveds, parsed))
          return receiveds_not_parsed(receiveds)
  
      else:
          # all's good! we have parsed or raw receiveds for each received header
          return receiveds_format(parsed)
docs: This function parses the receiveds headers.
  
      Args:
          receiveds (list): list of raw receiveds headers
  
      Returns:
          a list of parsed receiveds headers with first hop in first position