docs: def __reorganize_doi(temp_pub):
          """
          Create a valid bib json entry for the DOI information.
          "DOI" is technically the only valid DOI key, but there are sometimes a doi_id and doi_url entry.
          Check for all three and compare them, then keep whichever seems best.
          :param dict temp_pub:
          :return dict:
          """
          doi_out = ""
          doi_list = []
          rm = ["doiId", "doi", "doiUrl"]
          # Check if both entries exist
          if "doi" and "doiId" in temp_pub:
              if temp_pub["doi"] == temp_pub["doiId"]:
                  # If the entries are the same, then pick one to use
                  doi_out = temp_pub["doiId"]
              else:
                  # If entries are not the same, check if it matches the regex pattern.
                  if re_doi.findall(temp_pub["doiId"]):
                      doi_out = temp_pub["doiId"]
                  # If it doesnt match the regex, just use the "doi" entry as-is
                  else:
                      doi_out = temp_pub["doi"]
          # Check if "doiId" entry exists. Most common entry.
          elif "doiId" in temp_pub:
              doi_out = temp_pub["doiId"]
          # Check if "doi" entry exists. Fallback.
          elif "doi" in temp_pub:
              doi_out = temp_pub["doi"]
          # It's unlikely that ONLY the doi_url exists, but check if no doi found so far
          elif "doiUrl" in temp_pub:
              doi_out = temp_pub["doiUrl"]
  
          # Log if the DOI is invalid or not.
          if not re_doi.match(doi_out):
              logger_noaa_lpd.info("reorganize_doi: invalid doi input from NOAA file")
  
          # Get a list of all DOIs found in the string
          matches = re.findall(re_doi, doi_out)
          logger_noaa_lpd.info("reorganize_dois: found {} dois: {}".format(len(matches), doi_out))
  
          # Add identifier block to publication dictionary
          for doi in matches:
              doi_list.append({"type": "doi", "id": doi})
  
          # Remove the other DOI entries
          for k in rm:
              try:
                  del temp_pub[k]
              except KeyError:
                  # If there's a KeyError, don't worry about it. It's likely that only one of these keys will be present.
                  pass
  
          temp_pub["identifier"] = doi_list
          return temp_pub