code: def test_data_convert_nlu_yml(
      run: Callable[..., RunResult],
      tmp_path: Path,
      request: FixtureRequest,
  ):
      target_file = tmp_path / "out.yml"
  
      # The request rootdir is required as the `testdir` fixture in `run` changes the
      # working directory
      test_data_dir = Path(
          request.config.rootdir, "data", "examples", "rasa"
      )
      source_file = (test_data_dir / "demo-rasa.json").absolute()
      result = run(
          "data",
          "convert",
          "nlu",
          "--data",
          str(source_file),
          "--out",
          str(target_file),
          "-f",
          "yaml",
      )
  
      assert result.ret == 0
      assert target_file.exists()
  
      actual_data = RasaYAMLReader().read(target_file)
      expected = RasaYAMLReader().read(test_data_dir / "demo-rasa.yml")
  
      assert len(actual_data.training_examples) == len(
          expected.training_examples
      )
      assert len(actual_data.entity_synonyms) == len(
          expected.entity_synonyms
      )
      assert len(actual_data.regex_features) == len(
          expected.regex_features
      )
      assert len(actual_data.lookup_tables) == len(
          expected.lookup_tables
      )
      assert actual_data.entities == expected.entities
  
file_path: rasa/tests/cli/test_rasa_data.py
imports: import os
  from pathlib import Path
  from typing import Callable
  from _pytest.fixtures import FixtureRequest
  from _pytest.pytester import RunResult
  from rasa.shared.nlu.training_data.formats import RasaYAMLReader
  import rasa.shared.utils.io
  from tests.cli.conftest import RASA_EXE
label_desc: Use image node_id 3 for calling a global function with example usage: test_data_convert_nlu_yml(run, tmp_path, request) without return types