code: def identity(n, dtype="d", format=None):
      """Identity matrix in sparse format
  
      Returns an identity matrix with shape (n,n) using a given
      sparse format and dtype.
  
      Parameters
      ----------
      n : int
          Shape of the identity matrix.
      dtype : dtype, optional
          Data type of the matrix
      format : str, optional
          Sparse format of the result, e.g. format="csr", etc.
  
      Examples
      --------
      >>> from scipy.sparse import identity
      >>> identity(3).toarray()
      array([[ 1.,  0.,  0.],
             [ 0.,  1.,  0.],
             [ 0.,  0.,  1.]])
      >>> identity(3, dtype='int8', format='dia')
      <3x3 sparse matrix of type '<class 'numpy.int8'>'
              with 3 stored elements (1 diagonals) in DIAgonal format>
  
      """
      return eye(n, n, dtype=dtype, format=format)
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from scipy._lib._numpy_compat import get_randint
  from scipy._lib.six import xrange
  from .sputils import upcast, get_index_dtype, isscalarlike
  from .csr import csr_matrix
  from .csc import csc_matrix
  from .bsr import bsr_matrix
  from .coo import coo_matrix
  from .dia import dia_matrix
  from .base import issparse
label_desc: Use image node_id 3 for calling a global function with example usage: identity(n, dtype, format) and returns: eye