code: def make_sklearn_dataset() -> Callable:
      """
      Parameters
      ----------
      name : str = "iris"
          Name of the dataset to get
  
      make_sparse : bool = False
          Wehther to make the data sparse
  
      add_NaNs : bool = False
          Whether to add NaNs to the data
  
      train_size_maximum : int = 150
          THe maximum size of training data
  
      make_multilabel : bool = False
          Whether to force the data into being multilabel
  
      make_binary : bool = False
          Whether to force the data into being binary
  
      task: Optional[int] = None
          The task of the data, required for the datamanager
  
      feat_type: Optional[Dict | str] = None
          The features types for the data if making a XYDataManager
  
      as_datamanager: bool = False
          Wether to return the information as an XYDataManager
  
      Returns
      -------
      (X_train, Y_train, X_test, Y_Test) | XYDataManager
      """
  
      def _make(
          name: str = "iris",
          make_sparse: bool = False,
          add_NaNs: bool = False,
          train_size_maximum: int = 150,
          make_multilabel: bool = False,
          make_binary: bool = False,
          task: Optional[int] = None,
          feat_type: Optional[Dict | str] = None,
          as_datamanager: bool = False,
          return_target_as_string: bool = False,
      ) -> Any:
          X, y, Xt, yt = get_dataset(
              dataset=name,
              make_sparse=make_sparse,
              add_NaNs=add_NaNs,
              train_size_maximum=train_size_maximum,
              make_multilabel=make_multilabel,
              make_binary=make_binary,
              return_target_as_string=return_target_as_string,
          )
  
          if not as_datamanager:
              return (X, y, Xt, yt)
          else:
              assert task is not None and feat_type is not None
              if isinstance(feat_type, str):
                  feat_type = {i: feat_type for i in range(X.shape[1])}
  
              return XYDataManager(
                  X,
                  y,
                  Xt,
                  yt,
                  task=task,
                  dataset_name=name,
                  feat_type=feat_type,
              )
  
      return _make
  
file_path: auto-sklearn/test/fixtures/datasets.py
imports: from __future__ import annotations
  from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple
  import numpy
  import pandas
  from scipy.sparse import csr_matrix
  from sklearn.utils import check_random_state
  from autosklearn.constants import BINARY_CLASSIFICATION, MULTICLASS_CLASSIFICATION, MULTILABEL_CLASSIFICATION, MULTIOUTPUT_REGRESSION, REGRESSION
  from autosklearn.data.validation import SUPPORTED_FEAT_TYPES, SUPPORTED_TARGET_TYPES
  from autosklearn.data.xy_data_manager import XYDataManager
  from autosklearn.pipeline.util import get_dataset
  from pytest import fixture
  from test.conftest import DEFAULT_SEED
label_desc: Use image node_id 2 for calling a global function with example usage: make_sklearn_dataset() and returns: _make, X,  y,  Xt,  yt, XYDataManager