code: def test_build_header_with_fields(self):
      header_data = [
          "Test Post",
          "2014-11-04",
          "Alexis Métaireau",
          ["Programming"],
          ["Pelican", "Python"],
          "test-post",
      ]
  
      expected_docutils = "\n".join(
          [
              "Test Post",
              "#########",
              ":date: 2014-11-04",
              ":author: Alexis Métaireau",
              ":category: Programming",
              ":tags: Pelican, Python",
              ":slug: test-post",
              "\n",
          ]
      )
  
      expected_md = "\n".join(
          [
              "Title: Test Post",
              "Date: 2014-11-04",
              "Author: Alexis Métaireau",
              "Category: Programming",
              "Tags: Pelican, Python",
              "Slug: test-post",
              "\n",
          ]
      )
  
      self.assertEqual(build_header(*header_data), expected_docutils)
      self.assertEqual(build_markdown_header(*header_data), expected_md)
  
imports: import os
  import re
  from posixpath import join
  from unittest.mock import patch
  from pelican.settings import DEFAULT_CONFIG
  from pelican.tests.support import mute, skipIfNoExecutable, temporary_folder, unittest, TestCaseWithCLocale
  from pelican.tools.pelican_import import blogger2fields, build_header, build_markdown_header, decode_wp_content, download_attachments, fields2pelican, get_attachments, tumblr2fields, wp2fields
  from pelican.utils import path_to_file_url, slugify
label_desc: Use image node_id 2 for calling the TestBuildHeader obj's underlying member method code with example usage: obj.test_build_header_with_fields() without return types