docs: def parse_uniprot_txt_file(infile):
      """Parse a raw UniProt metadata file and return a dictionary.
  
      Args:
          infile: Path to metadata file
  
      Returns:
          dict: Metadata dictionary
  
      """
      uniprot_metadata_dict = {}
  
      metadata = old_parse_uniprot_txt_file(infile)
      metadata_keys = list(metadata.keys())
  
      if metadata_keys:
          metadata_key = metadata_keys[0]
      else:
          return uniprot_metadata_dict
  
      uniprot_metadata_dict['seq_len'] = len(str(metadata[metadata_key]['sequence']))
      uniprot_metadata_dict['reviewed'] = metadata[metadata_key]['is_reviewed']
      uniprot_metadata_dict['seq_version'] = metadata[metadata_key]['sequence_version']
      uniprot_metadata_dict['entry_version'] = metadata[metadata_key]['entry_version']
      if 'gene' in metadata[metadata_key]:
          uniprot_metadata_dict['gene_name'] = metadata[metadata_key]['gene']
      if 'description' in metadata[metadata_key]:
          uniprot_metadata_dict['description'] = metadata[metadata_key]['description']
      if 'refseq' in metadata[metadata_key]:
          uniprot_metadata_dict['refseq'] = metadata[metadata_key]['refseq']
      if 'kegg' in metadata[metadata_key]:
          uniprot_metadata_dict['kegg'] = metadata[metadata_key]['kegg']
      if 'ec' in metadata[metadata_key]:
          uniprot_metadata_dict['ec_number'] = metadata[metadata_key]['ec']
      if 'pfam' in metadata[metadata_key]:
          uniprot_metadata_dict['pfam'] = metadata[metadata_key]['pfam']
      if 'pdbs' in metadata[metadata_key]:
          uniprot_metadata_dict['pdbs'] = list(set(metadata[metadata_key]['pdbs']))
      return uniprot_metadata_dict