code: def _get_dtype_pos_in_defaults(func):
      """Get dtype position in defaults."""
      pos = 0
      for name, parameter in inspect.signature(func).parameters.items():
          if name == "dtype":
              return pos
          if parameter.default is not inspect._empty:
              pos += 1
  
      raise Exception("dtype is not kwarg")
  
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 2 for calling a global function with example usage: _get_dtype_pos_in_defaults(func) and returns: pos