code: def spatial_bounds_select(xvals, yvals, bounds):
      x0, y0, x1, y1 = bounds
      return np.array(
          [
              (
                  (x0 <= np.nanmin(xs))
                  & (y0 <= np.nanmin(ys))
                  & (x1 >= np.nanmax(xs))
                  & (y1 >= np.nanmax(ys))
              )
              for xs, ys in zip(xvals, yvals)
          ]
      )
  
imports: import sys
  import numpy
  import pandas
  from ..core import Dataset, NdOverlay, util
  from ..streams import Lasso, Selection1D, SelectionXY
  from ..util.transform import dim
  from .annotation import HSpan, VSpan
label_desc: Use image node_id 6 for calling a global function with example usage: spatial_bounds_select(xvals, yvals, bounds) and returns: np