code: def _safe_accumulator_op(op, x, *args, **kwargs):
      """
      This function provides numpy accumulator functions with a float64 dtype
      when used on a floating point input. This prevents accumulator overflow on
      smaller floating point dtypes.
  
      Parameters
      ----------
  
      op : function
          A cupy accumulator function such as cp.mean or cp.sum
      x : cupy array
          A numpy array to apply the accumulator function
      *args : positional arguments
          Positional arguments passed to the accumulator function after the
          input x
      **kwargs : keyword arguments
          Keyword arguments passed to the accumulator function
  
      Returns
      -------
  
      result : The output of the accumulator function passed to this function
  
      """
  
      if cp.issubdtype(x.dtype, cp.floating) and x.dtype.itemsize < 8:
          result = op(x, *args, **kwargs, dtype=cp.float64).astype(
              cp.float32
          )
      else:
          result = op(x, *args, **kwargs)
      return result
  
imports: from cuml.decomposition import PCA
  from cuml.internals.array import CumlArray
  import cuml.internals
  from cuml.internals.input_utils import input_to_cupy_array
  from cuml.common import input_to_cuml_array
  from cuml import Base
  from cuml.internals.safe_imports import cpu_only_import
  import numbers
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 3 for calling a global function with example usage: _safe_accumulator_op(op, x) and returns: result