class_docstr: The Path element represents one or more of path geometries with
  associated values. Each path geometry may be split into
  sub-geometries on NaN-values and may be associated with scalar
  values or array values varying along its length. In analogy to
  GEOS geometry types a Path is a collection of LineString and
  MultiLineString geometries with associated values.
  
  Like all other elements a Path may be defined through an
  extensible list of interfaces. Natively, HoloViews provides the
  MultiInterface which allows representing paths as lists of regular
  columnar data objects including arrays, dataframes and
  dictionaries of column arrays and scalars.
  
  The canonical representation is a list of dictionaries storing the
  x- and y-coordinates along with any other values:
  
      [{'x': 1d-array, 'y': 1d-array, 'value': scalar, 'continuous': 1d-array}, ...]
  
  Alternatively Path also supports a single columnar data-structure
  to specify an individual path:
  
      {'x': 1d-array, 'y': 1d-array, 'value': scalar, 'continuous': 1d-array}
  
  Both scalar values and values continuously varying along the
  geometries coordinates a Path may be used vary visual properties
  of the paths such as the color. Since not all formats allow
  storing scalar values as actual scalars, arrays that are the same
  length as the coordinates but have only one unique value are also
  considered scalar.
  
  The easiest way of accessing the individual geometries is using
  the `Path.split` method, which returns each path geometry as a
  separate entity, while the other methods assume a flattened
  representation where all paths are separated by NaN values.
class_docstr_tok: ["The","Path","element","represents","one","or","more","of","path","geometries","with","associated","values",".","Each","path","geometry","may","be","split","into","sub-geometries","on","NaN-values","and","may","be","associated","with","scalar","values","or","array","values","varying","along","its","length",".","In","analogy","to","GEOS","geometry","types","a","Path","is","a","collection","of","LineString","and","MultiLineString","geometries","with","associated","values",".","Like","all","other","elements","a","Path","may","be","defined","through","an","extensible","list","of","interfaces",".","Natively",",","HoloViews","provides","the","MultiInterface","which","allows","representing","paths","as","lists","of","regular","columnar","data","objects","including","arrays",",","dataframes","and","dictionaries","of","column","arrays","and","scalars",".","The","canonical","representation","is","a","list","of","dictionaries","storing","the","x-","and","y-coordinates","along","with","any","other","values",":","[","{","'","x","'",":","1d-array",",","'","y","'",":","1d-array",",","'value","'",":","scalar",",","'continuous","'",":","1d-array","}",",","...","]","Alternatively","Path","also","supports","a","single","columnar","data-structure","to","specify","an","individual","path",":","{","'","x","'",":","1d-array",",","'","y","'",":","1d-array",",","'value","'",":","scalar",",","'continuous","'",":","1d-array","}","Both","scalar","values","and","values","continuously","varying","along","the","geometries","coordinates","a","Path","may","be","used","vary","visual","properties","of","the","paths","such","as","the","color",".","Since","not","all","formats","allow","storing","scalar","values","as","actual","scalars",",","arrays","that","are","the","same","length","as","the","coordinates","but","have","only","one","unique","value","are","also","considered","scalar",".","The","easiest","way","of","accessing","the","individual","geometries","is","using","the","`","Path.split","`","method",",","which","returns","each","path","geometry","as","a","separate","entity",",","while","the","other","methods","assume","a","flattened","representation","where","all","paths","are","separated","by","NaN","values","."]
code: def __getitem__(self, key):
      if isinstance(key, np.ndarray):
          return self.select(selection_mask=np.squeeze(key))
      if key in self.dimensions():
          return self.dimension_values(key)
      if not isinstance(key, tuple) or len(key) == 1:
          key = (key, slice(None))
      elif len(key) == 0:
          return self.clone()
      if not all(isinstance(k, slice) for k in key):
          raise KeyError(
              f"{self.__class__.__name__} only support slice indexing"
          )
      xkey, ykey = key
      xstart, xstop = xkey.start, xkey.stop
      ystart, ystop = ykey.start, ykey.stop
      return self.clone(extents=(xstart, ystart, xstop, ystop))
  
imports: import numpy
  import param
  from ..core import Dataset
  from ..core.data import MultiInterface
  from ..core.dimension import Dimension
  from .geom import Geometry
  from .selection import SelectionPolyExpr
label_desc: Use image node_id 2 for calling the Path obj's underlying member method code with example usage: obj.__getitem__(key) and returns: self, self, self, self