code: def _create_identity_mat(shape, dtype):
      """Stack identity matrices.
  
      Parameters
      ----------
      shape : tuple
          Desired identity matrix shape of form [..., n, n].
      dtype : dtype
          Desired dtype.
  
      Returns
      -------
      identity : array-like, shape=[..., n, n]
          Stacked identity matrices.
      """
      ndim = len(shape)
      if ndim == 2:
          return gs.eye(shape[-1], dtype=dtype)
      return gs.stack(
          [gs.eye(shape[-1], dtype=dtype) for _ in range(shape[0])],
          axis=0,
      )
  
imports: import geomstats.backend
  from geomstats.geometry.base import ComplexVectorSpaceOpenSet
  from geomstats.geometry.complex_matrices import ComplexMatrices
  from geomstats.geometry.complex_riemannian_metric import ComplexRiemannianMetric
  from geomstats.geometry.hermitian_matrices import expmh, powermh
  from geomstats.geometry.matrices import Matrices
label_desc: Use image node_id 1 for calling a global function with example usage: _create_identity_mat(shape, dtype) and returns: gs, gs