code: def test_validate_dataset_compression_arg_raises_error_with_bad_key(
      key: str,
  ):
      """
      Parameters
      ----------
      key: str
          A key which should not be in the parameters
  
      Expects
      -------
      * Should raise a ValueError
      """
      bad_arg = {**default_dataset_compression_arg, key: 1337}
      with pytest.raises(ValueError, match=r"Unknown key"):
          validate_dataset_compression_arg(bad_arg, memory_limit=10)
  
imports: from typing import Any, Dict, List, Union
  import warnings
  from itertools import chain
  import numpy
  import pandas
  import sklearn.datasets
  from scipy.sparse import csr_matrix, spmatrix
  from autosklearn.constants import BINARY_CLASSIFICATION, CLASSIFICATION_TASKS, MULTICLASS_CLASSIFICATION, MULTILABEL_CLASSIFICATION, MULTIOUTPUT_REGRESSION, REGRESSION, REGRESSION_TASKS
  from autosklearn.util.data import default_dataset_compression_arg, reduce_dataset_size_if_too_large, reduce_precision, reduction_mapping, subsample, supported_precision_reductions, validate_dataset_compression_arg
  import pytest
label_desc: Use image node_id 5 for calling a global function with example usage: test_validate_dataset_compression_arg_raises_error_with_bad_key(key) without return types