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 numpy accumulator function such as np.mean or np.sum.
      x : ndarray
          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 np.issubdtype(x.dtype, np.floating) and x.dtype.itemsize < 8:
          result = op(x, *args, **kwargs, dtype=np.float64)
      else:
          result = op(x, *args, **kwargs)
      return result
  
imports: import warnings
  import numpy
  from scipy import linalg, sparse
  from .None import check_random_state
  from ._array_api import _is_numpy_namespace, get_namespace
  from ._logistic_sigmoid import _log_logistic_sigmoid
  from .sparsefuncs_fast import csr_row_norms
  from .validation import check_array
label_desc: Use image node_id 15 for calling a global function with example usage: _safe_accumulator_op(op, x) and returns: result