code: def _maybe_bool_ndarray(idx):
      """Returns a compatible array if elements are boolean."""
      idx = np.asanyarray(idx)
      if idx.dtype.kind == "b":
          return idx
      return None
  
imports: import numpy
  from ._sputils import isintlike
label_desc: Use image node_id 4 for calling a global function with example usage: _maybe_bool_ndarray(idx) and returns: None, idx