code: def _isna(obj, inf_as_na: bool = False):
      """
      Detect missing values, treating None, NaN or NA as null. Infinite
      values will also be treated as null if inf_as_na is True.
  
      Parameters
      ----------
      obj: ndarray or object value
          Input array or scalar value.
      inf_as_na: bool
          Whether to treat infinity as null.
  
      Returns
      -------
      boolean ndarray or boolean
      """
      if is_scalar(obj):
          return libmissing.checknull(obj, inf_as_na=inf_as_na)
      elif isinstance(obj, ABCMultiIndex):
          raise NotImplementedError(
              "isna is not defined for MultiIndex"
          )
      elif isinstance(obj, type):
          return False
      elif isinstance(obj, (np.ndarray, ABCExtensionArray)):
          return _isna_array(obj, inf_as_na=inf_as_na)
      elif isinstance(obj, ABCIndex):
          # Try to use cached isna, which also short-circuits for integer dtypes
          #  and avoids materializing RangeIndex._values
          if not obj._can_hold_na:
              return obj.isna()
          return _isna_array(obj._values, inf_as_na=inf_as_na)
  
      elif isinstance(obj, ABCSeries):
          result = _isna_array(obj._values, inf_as_na=inf_as_na)
          # box
          result = obj._constructor(
              result, index=obj.index, name=obj.name, copy=False
          )
          return result
      elif isinstance(obj, ABCDataFrame):
          return obj.isna()
      elif isinstance(obj, list):
          return _isna_array(
              np.asarray(obj, dtype=object), inf_as_na=inf_as_na
          )
      elif hasattr(obj, "__array__"):
          return _isna_array(np.asarray(obj), inf_as_na=inf_as_na)
      else:
          return False
  
imports: from __future__ import annotations
  from decimal import Decimal
  from functools import partial
  from typing import TYPE_CHECKING, overload
  import numpy
  from pandas._config import get_option
  from pandas._libs import lib
  import pandas._libs.missing
  from pandas._libs.tslibs import NaT, iNaT
  from pandas.core.dtypes.common import DT64NS_DTYPE, TD64NS_DTYPE, ensure_object, is_bool_dtype, is_categorical_dtype, is_complex_dtype, is_dtype_equal, is_extension_array_dtype, is_float_dtype, is_integer_dtype, is_object_dtype, is_scalar, is_string_or_object_np_dtype, needs_i8_conversion
  from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype, ExtensionDtype, IntervalDtype, PeriodDtype
  from pandas.core.dtypes.generic import ABCDataFrame, ABCExtensionArray, ABCIndex, ABCMultiIndex, ABCSeries
  from pandas.core.dtypes.inference import is_list_like
label_desc: Use image node_id 7 for calling a global function with example usage: _isna(obj, inf_as_na) and returns: libmissing, False, _isna_array, _isna_array, obj, result, obj, _isna_array, _isna_array, False