class_docstr: Annotator which allows drawing and editing Paths and associating
  values with each path and each vertex of a path using a table.
class_docstr_tok: ["Annotator","which","allows","drawing","and","editing","Paths","and","associating","values","with","each","path","and","each","vertex","of","a","path","using","a","table","."]
code: def _process_element(self, element=None):
      if element is None or not isinstance(element, self._element_type):
          datatype = list(self._element_type.datatype)
          datatype.remove("multitabular")
          datatype.append("multitabular")
          element = self._element_type(element, datatype=datatype)
  
      # Add annotation columns to poly data
      validate = []
      for col in self.annotations:
          if col in element:
              validate.append(col)
              continue
          init = (
              self.annotations[col]()
              if isinstance(self.annotations, dict)
              else ""
          )
          element = element.add_dimension(
              col, len(element.vdims), init, True
          )
      for col in self.vertex_annotations:
          if col in element:
              continue
          elif isinstance(self.vertex_annotations, dict):
              init = self.vertex_annotations[col]()
          else:
              init = ""
          element = element.add_dimension(
              col, len(element.vdims), init, True
          )
  
      # Validate annotations
      poly_data = {
          c: element.dimension_values(c, expanded=False)
          for c in validate
      }
      if validate and len({len(v) for v in poly_data.values()}) != 1:
          raise ValueError(
              "annotations must refer to value dimensions "
              "which vary per path while at least one of "
              "%s varies by vertex." % validate
          )
  
      # Add options to element
      tools = [tool() for tool in self._tools]
      opts = dict(tools=tools, color_index=None, **self.default_opts)
      opts.update(self._extra_opts)
      return element.options(
          **{
              k: v
              for k, v in opts.items()
              if k not in element.opts.get("plot").kwargs
          }
      )
  
imports: import sys
  from inspect import getmro
  import param
  from panel.layout import Row, Tabs
  from panel.pane import PaneBase
  from panel.util import param_name
  from .core import DynamicMap, Element, HoloMap, Layout, Overlay, Store, ViewableElement
  from .core.util import isscalar
  from .element import Curve, Path, Points, Polygons, Rectangles, Table
  from .plotting.links import DataLink, RectanglesTableLink, SelectionLink, VertexTableLink
  from .streams import BoxEdit, CurveEdit, PointDraw, PolyDraw, PolyEdit, Selection1D
label_desc: Use image node_id 3 for calling the PathAnnotator obj's underlying member method code with example usage: obj._process_element(element) and returns: element