code: def test_format_dict_empty_leaf_template_custom():
      """Test dict empty leaf node formatting with custom template"""
      template = "{key} is a leaf\n"
      dummy_dict_with_leafs = {1: {2: {}}, 2: {}, 3: {1: 3, 2: {}}}
      lines = format_dict(
          dummy_dict_with_leafs, templates={"empty_leaf": template}
      ).split("\n")
      assert len(lines) == 6
      # 1:
      assert lines[1] == "2 is a leaf"
      assert lines[2] == "2 is a leaf"
      # 3:
      #   1: 3
      assert lines[5] == "2 is a leaf"
  
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 12 for calling a global function with example usage: test_format_dict_empty_leaf_template_custom() without return types