code: def validate_putmask(
      values: ArrayLike | MultiIndex, mask: np.ndarray
  ) -> tuple[npt.NDArray[np.bool_], bool]:
      """
      Validate mask and check if this putmask operation is a no-op.
      """
      mask = extract_bool_array(mask)
      if mask.shape != values.shape:
          raise ValueError(
              "putmask: mask and data must be the same size"
          )
  
      noop = not mask.any()
      return mask, noop
  
file_path: catboost/contrib/python/pandas/py3/pandas/core/array_algos/putmask.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any
  import numpy
  from pandas._libs import lib
  from pandas._typing import ArrayLike, npt
  from pandas.compat import np_version_under1p21
  from pandas.core.dtypes.cast import infer_dtype_from
  from pandas.core.dtypes.common import is_list_like
  from pandas.core.arrays import ExtensionArray
label_desc: Use image node_id 3 for calling a global function with example usage: validate_putmask(values, mask) and returns: mask,  noop