class_docstr: Mixin class for Cartesian 2D elements to add basic support for
  SelectionExpr streams.
class_docstr_tok: ["Mixin","class","for","Cartesian","2D","elements","to","add","basic","support","for","SelectionExpr","streams","."]
code: def _get_lasso_selection(self, xdim, ydim, geometry, **kwargs):
      from .path import Path
  
      bbox = {xdim.name: geometry[:, 0], ydim.name: geometry[:, 1]}
      expr = dim.pipe(
          spatial_select, xdim, dim(ydim), geometry=geometry
      )
      index_cols = kwargs.get("index_cols")
      if index_cols:
          selection = self[expr.apply(self)]
          selection_expr = self._get_index_expr(index_cols, selection)
          return selection_expr, bbox, None
      return (
          expr,
          bbox,
          Path([np.concatenate([geometry, geometry[:1]])]),
      )
  
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 5 for calling the Selection2DExpr obj's underlying member method code with example usage: obj._get_lasso_selection(xdim, ydim, geometry) and returns: expr,  bbox,  Path, selection_expr,  bbox,  None