code: def convert_gempak_table(infile, outfile):
      r
      for line in infile:
          if not line.startswith('!') and line.strip():
              r, g, b = map(int, line.split())
              outfile.write('({0:f}, {1:f}, {2:f})\n'.format(r / 255, g / 255, b / 255))
docs: r"""Convert a GEMPAK color table to one MetPy can read.
  
      Reads lines from a GEMPAK-style color table file, and writes them to another file in
      a format that MetPy can parse.
  
      Parameters
      ----------
      infile : file-like object
          The file-like object to read from
      outfile : file-like object
          The file-like object to write to