code: def test_get_metric_name_invalid_metric():
      metric = deepcopy(SIMPLE_SUM_ADHOC_METRIC)
      del metric["label"]
      del metric["column"]
      with pytest.raises(ValueError):
          get_metric_name(metric)
  
      metric = deepcopy(SIMPLE_SUM_ADHOC_METRIC)
      del metric["label"]
      metric["expressionType"] = "FOO"
      with pytest.raises(ValueError):
          get_metric_name(metric)
  
      metric = deepcopy(SQL_ADHOC_METRIC)
      del metric["label"]
      metric["expressionType"] = "FOO"
      with pytest.raises(ValueError):
          get_metric_name(metric)
  
      metric = deepcopy(SQL_ADHOC_METRIC)
      del metric["expressionType"]
      with pytest.raises(ValueError):
          get_metric_name(metric)
  
      with pytest.raises(ValueError):
          get_metric_name(None)
      with pytest.raises(ValueError):
          get_metric_name(0)
      with pytest.raises(ValueError):
          get_metric_name({})
  
file_path: superset/tests/unit_tests/core_tests.py
imports: from copy import deepcopy
  import pytest
  from superset.utils.core import AdhocColumn, AdhocMetric, ExtraFiltersReasonType, ExtraFiltersTimeColumnType, GenericDataType, get_column_name, get_column_names, get_metric_name, get_metric_names, get_time_filter_status, is_adhoc_metric
  from tests.unit_tests.fixtures.datasets import get_dataset_mock
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_metric_name_invalid_metric() without return types