code: def _ident_like(A):
      # A compatibility function which should eventually disappear.
      if scipy.sparse.isspmatrix(A):
          return scipy.sparse.construct.eye(
              A.shape[0], A.shape[1], dtype=A.dtype, format=A.format
          )
      else:
          return np.eye(A.shape[0], A.shape[1], dtype=A.dtype)
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  import scipy.linalg
  import scipy.sparse.linalg
  from scipy.sparse.linalg import aslinearoperator
label_desc: Use image node_id 4 for calling a global function with example usage: _ident_like(A) and returns: scipy, np