code: def _readmailcapfile(fp, lineno):
      """Read a mailcap file and return a dictionary keyed by MIME type.
  
      Each MIME type is mapped to an entry consisting of a list of
      dictionaries; the list will contain more than one such dictionary
      if a given MIME type appears more than once in the mailcap file.
      Each dictionary contains key-value pairs for that MIME type, where
      the viewing command is stored with the key "view".
      """
      caps = {}
      while 1:
          line = fp.readline()
          if not line:
              break
          # Ignore comments and blank lines
          if line[0] == "#" or line.strip() == "":
              continue
          nextline = line
          # Join continuation lines
          while nextline[-2:] == "\\\n":
              nextline = fp.readline()
              if not nextline:
                  nextline = "\n"
              line = line[:-2] + nextline
          # Parse the line
          key, fields = parseline(line)
          if not (key and fields):
              continue
          if lineno is not None:
              fields["lineno"] = lineno
              lineno += 1
          # Normalize the key
          types = key.split("/")
          for j in range(len(types)):
              types[j] = types[j].strip()
          key = "/".join(types).lower()
          # Update the database
          if key in caps:
              caps[key].append(fields)
          else:
              caps[key] = [fields]
      return caps, lineno
  
file_path: catboost/contrib/tools/python3/src/Lib/mailcap.py
imports: import os
  import warnings
  import re
label_desc: Use image node_id 5 for calling a global function with example usage: _readmailcapfile(fp, lineno) and returns: caps,  lineno