code: def _fit_transform_one(
      transformer,
      X,
      y,
      weight,
      message_clsname="",
      message=None,
      **fit_params,
  ):
      """
      Fits ``transformer`` to ``X`` and ``y``. The transformed result is returned
      with the fitted transformer. If ``weight`` is not ``None``, the result will
      be multiplied by ``weight``.
      """
      with _print_elapsed_time(message_clsname, message):
          with cuml.using_output_type("cupy"):
              transformer.accept_sparse = True
              if hasattr(transformer, "fit_transform"):
                  res = transformer.fit_transform(X, y, **fit_params)
              else:
                  res = transformer.fit(X, y, **fit_params).transform(X)
  
      if weight is None:
          return res, transformer
      return res * weight, transformer
  
imports: from ..preprocessing import FunctionTransformer
  from ....thirdparty_adapters import check_array
  from ..utils.validation import check_is_fitted
  from ..utils.skl_dependencies import TransformerMixin, BaseComposition, BaseEstimator
  from cuml.internals import _deprecate_pos_args
  from cuml.internals.array_sparse import SparseCumlArray
  from cuml.internals.global_settings import _global_settings_data
  import cuml
  from itertools import chain
  from itertools import compress
  from joblib import Parallel
  import functools
  import timeit
  import numbers
  from cuml.internals.import_utils import has_sklearn
  from contextlib import contextmanager
  from collections import defaultdict
  import warnings
  from cuml.internals.safe_imports import cpu_only_import_from
  from cuml.internals.safe_imports import gpu_only_import_from
  from cuml.internals.safe_imports import cpu_only_import
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 9 for calling a global function with example usage: _fit_transform_one(transformer, X, y, weight, message_clsname, message) and returns: unknown,  transformer, res,  transformer