code: def test_format_metadata():
      """Test metadata section formatting"""
      experiment = DummyExperiment()
      experiment.metadata = dict(
          user="user",
          datetime="now",
          orion_version="1.0.1",
          VCS=dict(
              HEAD_sha="sha",
              active_branch="branch",
              diff_sha="smt",
              is_dirty=True,
              type="git",
          ),
      )
      assert (
          format_metadata(experiment)
          == """\
  Meta-data
  =========
  user: user
  datetime: now
  orion version: 1.0.1
  VCS:
    HEAD_sha: sha
    active_branch: branch
    diff_sha: smt
    is_dirty: True
    type: git
  """
      )
  
imports: import itertools
  import textwrap
  import pytest
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.utils.format_terminal import format_algorithm, format_commandline, format_config, format_dict, format_identification, format_info, format_list, format_metadata, format_refers, format_space, format_stats, format_title, get_trial_params
  from orion.core.worker.experiment import ExperimentStats
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 31 for calling a global function with example usage: test_format_metadata() without return types