code: def test_generate_dataset(self):
      # Given
      yaml_string = """
  # searchFlight Intent
  ---
  type: intent
  name: searchFlight
  utterances:
    - find me a flight to [destination:city](Lima) [date:snips/datetime](tonight)
  
  # City Entity
  ---
  type: entity
  name: city
  values:
    - [new york, big apple]"""
      self.tmp_file_path = self.tmp_file_path.with_suffix(".yaml")
      with self.tmp_file_path.open(mode="w", encoding="utf8") as f:
          f.write(unicode_string(yaml_string))
  
      # When
      out = io.StringIO()
      with redirect_stdout(out):
          generate_dataset("en", str(self.tmp_file_path))
      printed_value = out.getvalue()
  
      # Then
      expected_value = """{
    "entities": {
      "city": {
        "automatically_extensible": true,
        "data": [
          {
            "synonyms": [
              "big apple"
            ],
            "value": "new york"
          }
        ],
        "matching_strictness": 1.0,
        "use_synonyms": true
      },
      "snips/datetime": {}
    },
    "intents": {
      "searchFlight": {
        "utterances": [
          {
            "data": [
              {
                "text": "find me a flight to "
              },
              {
                "entity": "city",
                "slot_name": "destination",
                "text": "Lima"
              },
              {
                "text": " "
              },
              {
                "entity": "snips/datetime",
                "slot_name": "date",
                "text": "tonight"
              }
            ]
          }
        ]
      }
    },
    "language": "en"
  }
  """
      self.assertEqual(expected_value, printed_value)
  
imports: import io
  import shutil
  import sys
  import tempfile
  from mock import patch
  from snips_nlu.__about__ import __model_version__, __version__
  from snips_nlu.cli import get_arg_parser
  from snips_nlu.cli.generate_dataset import generate_dataset
  from snips_nlu.cli.inference import parse
  from snips_nlu.cli.metrics import cross_val_metrics, train_test_metrics
  from snips_nlu.cli.training import train
  from snips_nlu.common.utils import unicode_string, json_string
  from snips_nlu.dataset import Dataset
  from snips_nlu.nlu_engine import SnipsNLUEngine
  from snips_nlu.tests.utils import SnipsTest, TEST_PATH, redirect_stdout
label_desc: Use image node_id 6 for calling the TestCLI obj's underlying member method code with example usage: obj.test_generate_dataset() without return types