code: def is_scipy_sparse(arr) -> bool:
      """
      Check whether an array-like is a scipy.sparse.spmatrix instance.
  
      Parameters
      ----------
      arr : array-like
          The array-like to check.
  
      Returns
      -------
      boolean
          Whether or not the array-like is a scipy.sparse.spmatrix instance.
  
      Notes
      -----
      If scipy is not installed, this function will always return False.
  
      Examples
      --------
      >>> from scipy.sparse import bsr_matrix
      >>> is_scipy_sparse(bsr_matrix([1, 2, 3]))
      True
      >>> is_scipy_sparse(pd.arrays.SparseArray([1, 2, 3]))
      False
      """
      global _is_scipy_sparse
  
      if (
          _is_scipy_sparse is None
      ):  # pylint: disable=used-before-assignment
          try:
              from scipy.sparse import issparse as _is_scipy_sparse
          except ImportError:
              _is_scipy_sparse = lambda _: False
  
      assert _is_scipy_sparse is not None
      return _is_scipy_sparse(arr)
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any, Callable
  import warnings
  import numpy
  from pandas._libs import Interval, Period, algos, lib
  from pandas._libs.tslibs import conversion
  from pandas.util._exceptions import find_stack_level
  from pandas.core.dtypes.base import _registry
  from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype, ExtensionDtype, IntervalDtype, PeriodDtype, SparseDtype
  from pandas.core.dtypes.generic import ABCIndex
  from pandas.core.dtypes.inference import is_array_like, is_bool, is_complex, is_dataclass, is_decimal, is_dict_like, is_file_like, is_float, is_hashable, is_integer, is_interval, is_iterator, is_list_like, is_named_tuple, is_nested_list_like, is_number, is_re, is_re_compilable, is_scalar, is_sequence
label_desc: Use image node_id 7 for calling a global function with example usage: is_scipy_sparse(arr) and returns: _is_scipy_sparse