code: def test_get_recipe_config_for_recipe_directory_referencing_external_json(
      enter_recipe_example_directory, tmp_path
  ):
      recipe_root_path = enter_recipe_example_directory
      test_recipe_root_path = tmp_path / "test_recipe"
      shutil.copytree(recipe_root_path, test_recipe_root_path)
  
      test_recipe_config = {
          "config1": 10,
          "config2": {
              "subconfig": ["A"],
          },
          "config3": "3",
          "config_from_profile": "{{PROFILE_CONFIG}}",
      }
      write_yaml(
          test_recipe_root_path,
          "recipe.yaml",
          test_recipe_config,
          overwrite=True,
      )
  
      # Write a profiles/test.yaml file that references keys in an external JSON file
      test_profile_name = "test"
      profile_contents = {
          "PROFILE_CONFIG": """{{ ("example-json.json" | from_json)["my-key"]["nested-key"] }}"""
      }
      profiles_dir = os.path.join(test_recipe_root_path, "profiles")
      if not os.path.exists(profiles_dir):
          os.mkdir(profiles_dir)
      write_yaml(
          test_recipe_root_path,
          f"profiles/{test_profile_name}.yaml",
          profile_contents,
          overwrite=True,
      )
  
      # Write the external JSON file
      value_from_json = "my-value-from-external-json"
      example_json = {
          "my-key": {
              "nested-key": value_from_json,
          },
      }
      with open(
          os.path.join(test_recipe_root_path, "example-json.json"), "w"
      ) as handle:
          handle.write(json.dumps(example_json))
      # Load recipe config and assert correctness
      expected_config = {}
      expected_config.update(test_recipe_config)
      expected_config.update(
          {
              "config_from_profile": value_from_json,
              "PROFILE_CONFIG": value_from_json,
          }
      )
      with chdir(test_recipe_root_path):
          assert (
              get_recipe_config(profile=test_profile_name)
              == expected_config
          )
  
imports: import json
  import os
  import pathlib
  import shutil
  from unittest import mock
  import pytest
  from mlflow.exceptions import MlflowException
  from mlflow.recipes.utils import get_default_profile, get_recipe_config, get_recipe_name, get_recipe_root_path
  from mlflow.utils.file_utils import write_yaml
  from tests.recipes.helper_functions import chdir
label_desc: Use image node_id 6 for calling a global function with example usage: test_get_recipe_config_for_recipe_directory_referencing_external_json(enter_recipe_example_directory, tmp_path) without return types