code: def validate_header(self, channeldir, filename, expected_header):
          
          expected = set(expected_header)
          csv_filename = get_metadata_file_path(channeldir, filename)
          csv_lines = _read_csv_lines(csv_filename)
          dict_reader = csv.DictReader(csv_lines)
          actual = set(dict_reader.fieldnames)
          if not actual == expected:
              raise ValueError('Unexpected CSV file header in ' + csv_filename \
                               + ' Expected header:' + str(expected))
docs: Check if CSV metadata file `filename` have the expected header format.