code: def get_pattern(name, n_samples):
      np.random.seed(0)
      random_state = 170
  
      if name == "noisy_circles":
          data = datasets.make_circles(
              n_samples=n_samples, factor=0.5, noise=0.05
          )
          params = {
              "damping": 0.77,
              "preference": -240,
              "quantile": 0.2,
              "n_clusters": 2,
          }
  
      elif name == "noisy_moons":
          data = datasets.make_moons(n_samples=n_samples, noise=0.05)
          params = {
              "damping": 0.75,
              "preference": -220,
              "n_clusters": 2,
          }
  
      elif name == "varied":
          data = datasets.make_blobs(
              n_samples=n_samples,
              cluster_std=[1.0, 2.5, 0.5],
              random_state=random_state,
          )
          params = {"eps": 0.18, "n_neighbors": 2}
  
      elif name == "blobs":
          data = datasets.make_blobs(
              n_samples=n_samples, random_state=8
          )
          params = {}
  
      elif name == "aniso":
          X, y = datasets.make_blobs(
              n_samples=n_samples, random_state=random_state
          )
          transformation = [[0.6, -0.6], [-0.4, 0.8]]
          X_aniso = np.dot(X, transformation)
          data = (X_aniso, y)
          params = {"eps": 0.15, "n_neighbors": 2}
  
      elif name == "no_structure":
          data = np.random.rand(n_samples, 2), None
          params = {}
  
      return [data, params]
  
imports: import pytest
  from cuml.internals.mem_type import MemoryType
  from cuml.internals.input_utils import input_to_cuml_array, is_array_like
  from cuml.internals.base import Base
  import cuml
  from sklearn.model_selection import train_test_split
  from sklearn.metrics import mean_squared_error, brier_score_loss
  from sklearn.datasets import make_classification, make_regression
  from sklearn import datasets
  from pylibraft.common.cuda import Stream
  from sklearn.datasets import make_regression
  from numba.cuda.cudadrv.devicearray import DeviceNDArray
  from numbers import Number
  from cuml.internals.safe_imports import gpu_only_import_from
  from itertools import dropwhile
  from copy import deepcopy
  from cuml.internals.safe_imports import cpu_only_import
  import inspect
  from textwrap import dedent, indent
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 3 for calling a global function with example usage: get_pattern(name, n_samples) and returns: list