code: def _dyn_update_dtype(dtype_pos=None, target=None):
      """Update (dynamically) function dtype.
  
      Parameters
      ----------
      dtype_pos : int
          Position of "dtype" argument.
  
      How it works?
      -------------
      When the function is called, it verifies if dtype is passed. If not, it
      uses default dtype.
      """
  
      def _decorator(func):
          @functools.wraps(func)
          def _wrapped(*args, **kwargs):
              if dtype_pos is not None and len(args) > dtype_pos:
                  args = list(args)
                  args[dtype_pos] = _config.DEFAULT_DTYPE
  
              else:
                  if kwargs.get("dtype") is None:
                      kwargs["dtype"] = _config.DEFAULT_DTYPE
  
              return func(*args, **kwargs)
  
          return _wrapped
  
      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 7 for calling a global function with example usage: _dyn_update_dtype(dtype_pos, target) and returns: _decorator, _wrapped, _decorator, func