code: def _parse_optional(fh):
      """
      Parse the optional fields for kern pair data and composites.
  
      Returns
      -------
      kern_data : dict
          A dict containing kerning information. May be empty.
          See `._parse_kern_pairs`.
      composites : dict
          A dict containing composite information. May be empty.
          See `._parse_composites`.
      """
      optional = {
          b"StartKernData": _parse_kern_pairs,
          b"StartComposites": _parse_composites,
      }
  
      d = {b"StartKernData": {}, b"StartComposites": {}}
      for line in fh:
          line = line.rstrip()
          if not line:
              continue
          key = line.split()[0]
  
          if key in optional:
              d[key] = optional[key](fh)
  
      return d[b"StartKernData"], d[b"StartComposites"]
  
imports: from collections import namedtuple
  import logging
  import re
  from ._mathtext_data import uni2type1
label_desc: Use image node_id 11 for calling a global function with example usage: _parse_optional(fh) and returns: d,  d