code: def generate_headerfields(headertypes, allfield_defs, poolnames, db=False, genecentric=False):
      
      hfields = {}
      for fieldtype in headertypes:
          if fieldtype == 'isoquant':
              continue
          elif fieldtype == 'proteindata':
              hfield_definitions = allfield_defs[fieldtype](poolnames, genecentric)
          else:
              hfield_definitions = allfield_defs[fieldtype](poolnames)
          hfields[fieldtype] = OrderedDict()
          for fieldname, poolnames in hfield_definitions.items():
              hfields[fieldtype][fieldname] = get_header_field(fieldname,
                                                               poolnames)
      if 'isoquant' in headertypes:
          hfield_definitions = allfield_defs['isoquant'](db, poolnames)
          hfields['isoquant'] = OrderedDict()
          for poolname in poolnames:
              for fieldname in hfield_definitions:
                  hfields['isoquant'][fieldname] = get_header_field(
                      fieldname, poolnames)
      return hfields
docs: Returns a headerfields object (dict) which contains information on
      fields of the header, including optional pool names