code: def _parse_optional(fh):
      """
      Parse the optional fields for kern pair data and composites
  
      return value is a (*kernDict*, *compositeDict*) which are the
      return values from :func:`_parse_kern_pairs`, and
      :func:`_parse_composites` if the data exists, or empty dicts
      otherwise
      """
      optional = {
          "StartKernData": _parse_kern_pairs,
          "StartComposites": _parse_composites,
      }
  
      d = {"StartKernData": {}, "StartComposites": {}}
      while 1:
          line = fh.readline()
          if not line:
              break
          line = line.rstrip()
          if len(line) == 0:
              continue
          key = line.split()[0]
  
          if key in optional:
              d[key] = optional[key](fh)
  
      l = (d["StartKernData"], d["StartComposites"])
      return l
  
imports: import sys, os, re
  from _mathtext_data import uni2type1
label_desc: Use image node_id 9 for calling a global function with example usage: _parse_optional(fh) and returns: l