class_docstr: The annotate function allows drawing, editing and annotating any
  given Element (if it is supported). The annotate function returns
  a Layout of the editable plot and an Overlay of table(s), which
  allow editing the data of the element. The edited and annotated
  data may be accessed using the element and selected properties.
class_docstr_tok: ["The","annotate","function","allows","drawing",",","editing","and","annotating","any","given","Element","(","if","it","is","supported",")",".","The","annotate","function","returns","a","Layout","of","the","editable","plot","and","an","Overlay","of","table","(","s",")",",","which","allow","editing","the","data","of","the","element",".","The","edited","and","annotated","data","may","be","accessed","using","the","element","and","selected","properties","."]
code: def __call__(self, element, **params):
      overlay = element if isinstance(element, Overlay) else [element]
  
      layers = []
      annotator_type = None
      for element in overlay:
          matches = []
          for eltype, atype in self._annotator_types.items():
              if isinstance(element, eltype):
                  matches.append(
                      (getmro(type(element)).index(eltype), atype)
                  )
          if matches:
              if annotator_type is not None:
                  msg = (
                      "An annotate call may only annotate a single element. "
                      "If you want to annotate multiple elements call annotate "
                      "on each one separately and then use the annotate.compose "
                      "method to combine them into a single layout."
                  )
                  raise ValueError(msg)
              annotator_type = sorted(matches)[0][1]
              self.annotator = annotator_type(element, **params)
              tables = Overlay(
                  [t[0].object for t in self.annotator.editor],
                  group="Annotator",
              )
              layout = self.annotator.plot + tables
              layers.append(layout)
          else:
              layers.append(element)
  
      if annotator_type is None:
          obj = overlay if isinstance(overlay, Overlay) else element
          raise ValueError(
              "Could not find an Element to annotate on"
              "%s object." % type(obj).__name__
          )
  
      if len(layers) == 1:
          return layers[0]
      return self.compose(*layers)
  
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 4 for calling the annotate obj's underlying member method code with example usage: obj.__call__(element) and returns: self, layers