code: def test_reduce_dataset_invalid_memory_allocation_float(
      memory_allocation: float,
  ):
      """
      Parameters
      ----------
      memory_allocation: float
          An invalid memory allocation as a float
  
      Expects
      -------
      * Should raise a ValueError
      """
      with pytest.raises(
          ValueError,
          match=r"memory_allocation if float must be in \(0, 1\)",
      ):
          reduce_dataset_size_if_too_large(
              X=np.empty(1),
              y=np.empty(1),
              memory_limit=100,
              is_classification=True,
              memory_allocation=memory_allocation,
          )
  
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 18 for calling a global function with example usage: test_reduce_dataset_invalid_memory_allocation_float(memory_allocation) without return types