code: def isin(comps: ListLike, values: ListLike) -> npt.NDArray[np.bool_]:
      """
      Compute the isin boolean array.
  
      Parameters
      ----------
      comps : list-like
      values : list-like
  
      Returns
      -------
      ndarray[bool]
          Same length as `comps`.
      """
      if not is_list_like(comps):
          raise TypeError(
              "only list-like objects are allowed to be passed "
              f"to isin(), you passed a `{type(comps).__name__}`"
          )
      if not is_list_like(values):
          raise TypeError(
              "only list-like objects are allowed to be passed "
              f"to isin(), you passed a `{type(values).__name__}`"
          )
  
      if not isinstance(
          values, (ABCIndex, ABCSeries, ABCExtensionArray, np.ndarray)
      ):
          orig_values = list(values)
          values = _ensure_arraylike(
              orig_values, func_name="isin-targets"
          )
  
          if (
              len(values) > 0
              and values.dtype.kind in "iufcb"
              and not is_signed_integer_dtype(comps)
          ):
              # GH#46485 Use object to avoid upcast to float64 later
              # TODO: Share with _find_common_type_compat
              values = construct_1d_object_array_from_listlike(
                  orig_values
              )
  
      elif isinstance(values, ABCMultiIndex):
          # Avoid raising in extract_array
          values = np.array(values)
      else:
          values = extract_array(
              values, extract_numpy=True, extract_range=True
          )
  
      comps_array = _ensure_arraylike(comps, func_name="isin")
      comps_array = extract_array(comps_array, extract_numpy=True)
      if not isinstance(comps_array, np.ndarray):
          # i.e. Extension Array
          return comps_array.isin(values)
  
      elif needs_i8_conversion(comps_array.dtype):
          # Dispatch to DatetimeLikeArrayMixin.isin
          return pd_array(comps_array).isin(values)
      elif needs_i8_conversion(values.dtype) and not is_object_dtype(
          comps_array.dtype
      ):
          # e.g. comps_array are integers and values are datetime64s
          return np.zeros(comps_array.shape, dtype=bool)
          # TODO: not quite right ... Sparse/Categorical
      elif needs_i8_conversion(values.dtype):
          return isin(comps_array, values.astype(object))
  
      elif isinstance(values.dtype, ExtensionDtype):
          return isin(np.asarray(comps_array), np.asarray(values))
  
      # GH16012
      # Ensure np.isin doesn't get object types or it *may* throw an exception
      # Albeit hashmap has O(1) look-up (vs. O(logn) in sorted array),
      # isin is faster for small sizes
      if (
          len(comps_array) > _MINIMUM_COMP_ARR_LEN
          and len(values) <= 26
          and comps_array.dtype != object
      ):
          # If the values include nan we need to check for nan explicitly
          # since np.nan it not equal to np.nan
          if isna(values).any():
  
              def f(c, v):
                  return np.logical_or(
                      np.isin(c, v).ravel(), np.isnan(c)
                  )
  
          else:
              f = lambda a, b: np.isin(a, b).ravel()
  
      else:
          common = np_find_common_type(values.dtype, comps_array.dtype)
          values = values.astype(common, copy=False)
          comps_array = comps_array.astype(common, copy=False)
          f = htable.ismember
  
      return f(comps_array, values)
  
imports: from __future__ import annotations
  import decimal
  import operator
  from textwrap import dedent
  from typing import TYPE_CHECKING, Literal, cast
  import warnings
  import numpy
  from pandas._libs import algos, hashtable, iNaT, lib
  from pandas._typing import AnyArrayLike, ArrayLike, ArrayLikeT, AxisInt, DtypeObj, TakeIndexer, npt
  from pandas.util._decorators import doc
  from pandas.util._exceptions import find_stack_level
  from pandas.core.dtypes.cast import construct_1d_object_array_from_listlike, np_find_common_type
  from pandas.core.dtypes.common import ensure_float64, ensure_object, ensure_platform_int, is_array_like, is_bool_dtype, is_complex_dtype, is_dict_like, is_extension_array_dtype, is_float, is_float_dtype, is_integer, is_integer_dtype, is_list_like, is_object_dtype, is_signed_integer_dtype, needs_i8_conversion
  from pandas.core.dtypes.concat import concat_compat
  from pandas.core.dtypes.dtypes import BaseMaskedDtype, CategoricalDtype, ExtensionDtype, NumpyEADtype
  from pandas.core.dtypes.generic import ABCDatetimeArray, ABCExtensionArray, ABCIndex, ABCMultiIndex, ABCSeries, ABCTimedeltaArray
  from pandas.core.dtypes.missing import isna, na_value_for_dtype
  from pandas.core.array_algos.take import take_nd
  from pandas.core.construction import array, ensure_wrapped_if_datetimelike, extract_array
  from pandas.core.indexers import validate_indices
label_desc: Use image node_id 9 for calling a global function with example usage: isin(comps, values) and returns: f, comps_array, pd_array, np, np, isin, isin