def _parse_optional(fh):
 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

def _parse_optional ( fh ) : 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
parse the optional fields for kern pair data and composites return value is a which are the return values from :func:_parse_kern_pairs .