code: def test_hyperparams_defaults(estimator):
      if estimator is UMAP and IS_ARM:
          pytest.skip("https://github.com/rapidsai/cuml/issues/5441")
      model = estimator()
      cu_signature = inspect.signature(model.__init__).parameters
  
      if hasattr(model, "_cpu_estimator_import_path"):
          model_path = model._cpu_estimator_import_path
      else:
          model_path = "sklearn" + model.__class__.__module__[4:]
      model_name = model.__class__.__name__
      cpu_model = getattr(import_module(model_path), model_name)
      cpu_signature = inspect.signature(cpu_model.__init__).parameters
  
      common_hyperparams = list(
          set(cu_signature.keys()) & set(cpu_signature.keys())
      )
      error_msg = "Different default values for hyperparameters:\n"
      similar = True
      for hyperparam in common_hyperparams:
          if (
              cu_signature[hyperparam].default
              != cpu_signature[hyperparam].default
          ):
              similar = False
              error_msg += (
                  "\t{} with cuML default :"
                  "'{}' and CPU default : '{}'"
                  "\n".format(
                      hyperparam,
                      cu_signature[hyperparam].default,
                      cpu_signature[hyperparam].default,
                  )
              )
  
      if not similar:
          raise ValueError(error_msg)
  
imports: import platform
  from cuml.testing.test_preproc_utils import to_output_type
  from cuml.testing.utils import array_equal
  from cuml.cluster.hdbscan import HDBSCAN
  from cuml.neighbors import NearestNeighbors
  from cuml.metrics import trustworthiness
  from cuml.metrics import adjusted_rand_score
  from cuml.manifold import UMAP
  from cuml.linear_model import ElasticNet, Lasso, LinearRegression, LogisticRegression, Ridge
  from cuml.internals.memory_utils import using_memory_type
  from cuml.internals.mem_type import MemoryType
  from cuml.decomposition import PCA, TruncatedSVD
  from cuml.common.device_selection import DeviceType, using_device_type
  from hdbscan import HDBSCAN
  from sklearn.neighbors import NearestNeighbors
  from sklearn.linear_model import Ridge
  from sklearn.linear_model import ElasticNet
  from sklearn.linear_model import Lasso
  from sklearn.linear_model import LogisticRegression
  from sklearn.linear_model import LinearRegression
  from sklearn.decomposition import PCA
  from sklearn.decomposition import TruncatedSVD
  from sklearn.datasets import make_regression, make_blobs
  from pytest_cases import fixture_union, fixture_plus
  from importlib import import_module
  import inspect
  import pickle
  from cuml.internals.safe_imports import gpu_only_import
  import itertools
  import pytest
  import cuml
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 27 for calling a global function with example usage: test_hyperparams_defaults(estimator) without return types