code: def _check_is_partition(parts: Iterable, whole: Iterable):
      whole = set(whole)
      parts = [set(x) for x in parts]
      if set.intersection(*parts) != set():
          raise ValueError(
              "Is not a partition because intersection is not null."
          )
      if set.union(*parts) != whole:
          raise ValueError(
              "Is not a partition because union is not the whole."
          )
  
file_path: catboost/contrib/python/pandas/py3/pandas/core/arrays/sparse/scipy_sparse.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Iterable
  import numpy
  from pandas._libs import lib
  from pandas._typing import IndexLabel, npt
  from pandas.core.dtypes.missing import notna
  from pandas.core.algorithms import factorize
  from pandas.core.indexes.api import MultiIndex
  from pandas.core.series import Series
label_desc: Use image node_id 1 for calling a global function with example usage: _check_is_partition(parts, whole) without return types