code: def _get_umf_family(A):
      """Get umfpack family string given the sparse matrix dtype."""
      _families = {
          (np.float64, np.int32): "di",
          (np.complex128, np.int32): "zi",
          (np.float64, np.int64): "dl",
          (np.complex128, np.int64): "zl",
      }
  
      # A.dtype.name can only be "float64" or
      # "complex128" in control flow
      f_type = getattr(np, A.dtype.name)
      # control flow may allow for more index
      # types to get through here
      i_type = getattr(np, A.indices.dtype.name)
  
      try:
          family = _families[(f_type, i_type)]
  
      except KeyError as e:
          msg = (
              "only float64 or complex128 matrices with int32 or int64 "
              f"indices are supported! (got: matrix: {f_type}, indices: {i_type})"
          )
          raise ValueError(msg) from e
  
      # See gh-8278. Considered converting only if
      # A.shape[0]*A.shape[1] > np.iinfo(np.int32).max,
      # but that didn't always fix the issue.
      family = family[0] + "l"
      A_new = copy.copy(A)
      A_new.indptr = np.array(A.indptr, copy=False, dtype=np.int64)
      A_new.indices = np.array(A.indices, copy=False, dtype=np.int64)
  
      return family, A_new
  
file_path: scipy/scipy/sparse/linalg/_dsolve/linsolve.py
imports: from warnings import warn
  import numpy
  from numpy import asarray
  from scipy.sparse import issparse, SparseEfficiencyWarning, csc_matrix, csr_matrix
  from scipy.sparse._sputils import is_pydata_spmatrix
  from scipy.linalg import LinAlgError
  import copy
  from .None import _superlu
label_desc: Use image node_id 2 for calling a global function with example usage: _get_umf_family(A) and returns: family,  A_new