code: def _valid_headerline(l):
      
  
      if not l:
          return False
      headers = l.split('\t')
      first_col = headers[0]
  
      tsplit = first_col.split(':')
      if len(tsplit) != 2:
          return False
  
      if tsplit[0] in ('entity', 'update'):
          return tsplit[1] in ('participant_id', 'participant_set_id',
                               'sample_id', 'sample_set_id',
                               'pair_id', 'pair_set_id')
      elif tsplit[0] == 'membership':
          if len(headers) < 2:
              return False
          # membership:sample_set_id   sample_id, e.g.
          return tsplit[1].replace('set_', '') == headers[1]
      else:
          return False
docs: return true if the given string is a valid loadfile header