code: def _identity_matrix(n, domain):
      M = [[domain.zero] * n for _ in range(n)]
  
      for i in range(n):
          M[i][i] = domain.one
  
      return M
  
file_path: sympy/sympy/polys/fglmtools.py
imports: from sympy.polys.monomials import monomial_mul, monomial_div
label_desc: Use image node_id 3 for calling a global function with example usage: _identity_matrix(n, domain) and returns: M