code: def _modify_func_default_dtype(copy=True, kw_only=False, target=None):
      """Modify function default dtype by acting directly in the target object.
  
      Parameters
      ----------
      copy: bool
          If true, copies function before changing dtype.
      kw_only : bool
          If true, it is assumed dtype is kwarg only argument.
  
      How it works?
      -------------
      This decorator only collects functions. Default dtype is modified only
      when default dtype is changed (see `_update_default_dtypes`).
      """
  
      def _decorator(func):
          new_func = _copy_func(func) if copy else func
  
          if kw_only:
              _TO_UPDATE_FUNCS_KW_DTYPE.append(new_func)
          else:
              _TO_UPDATE_FUNCS_DTYPE.append(new_func)
  
          return new_func
  
      if target is None:
          return _decorator
  
      return _decorator(target)
  
file_path: geomstats/geomstats/_backend/_dtype_utils.py
imports: import functools
  import inspect
  import types
  from geomstats._backend import _backend_config
label_desc: Use image node_id 4 for calling a global function with example usage: _modify_func_default_dtype(copy, kw_only, target) and returns: _decorator, new_func, _decorator