code: def test_import_datasets_sync_argument_metrics(
      import_datasets_command, app_context, fs
  ):
      """
      Test that the --sync command line argument syncs dataset in superset
      with YAML file. Using only metrics with the --sync flag
      """
      # pylint: disable=reimported, redefined-outer-name
      import superset.cli.importexport  # noqa: F811
  
      # reload to define export_datasets correctly based on the
      # feature flags
      importlib.reload(superset.cli.importexport)
  
      # write YAML file
      with open("dataset.yaml", "w") as fp:
          fp.write("hello: world")
  
      runner = app.test_cli_runner()
      response = runner.invoke(
          superset.cli.importexport.import_datasources,
          ["-p", "dataset.yaml", "-s", "metrics"],
      )
  
      assert response.exit_code == 0
      expected_contents = {"dataset.yaml": "hello: world"}
      import_datasets_command.assert_called_with(
          expected_contents,
          sync_columns=False,
          sync_metrics=True,
      )
  
imports: import importlib
  import json
  import logging
  from pathlib import Path
  from unittest import mock
  from zipfile import is_zipfile, ZipFile
  import pytest
  import yaml
  from freezegun import freeze_time
  import superset.cli.importexport
  import superset.cli.thumbnails
  from superset import app, db
  from superset.models.dashboard import Dashboard
  from tests.integration_tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices, load_birth_names_data
label_desc: Use image node_id 13 for calling a global function with example usage: test_import_datasets_sync_argument_metrics(import_datasets_command, app_context, fs) without return types