code: def dataset_generate_x(
      x: np.ndarray, n_samples: Optional[int] = None
  ) -> np.ndarray:
      """Helper function to create uniform test samples."""
      if not isinstance(x, np.ndarray) or x.ndim != 2:
          msg = "Two dimensional numpy array is required."
          raise AssertionError(msg)
      if not n_samples:
          n_samples = PORTER_N_GEN_REGRESSION_TESTS
      return np.random.uniform(
          low=np.amin(x, axis=0),
          high=np.amax(x, axis=0),
          size=(n_samples, len(x[0])),
      )
  
file_path: sklearn-porter/tests/utils/__init__.py
imports: from os import environ, sep
  from pathlib import Path
  from typing import List, Optional, Tuple
  import numpy
  from tests.commons import PORTER_N_UNI_REGRESSION_TESTS, PORTER_N_GEN_REGRESSION_TESTS
label_desc: Use image node_id 2 for calling a global function with example usage: dataset_generate_x(x, n_samples) and returns: np