class_docstr: A property value container for ColumnData that supports change
  notifications on mutating operations.
  
  This property value container affords specialized code paths for
  updating the .data dictionary for ColumnDataSource. When possible,
  more efficient ColumnDataChangedEvent hints are generated to perform
  the updates:
  
  .. code-block:: python
  
      x[i] = y
      x.update
docstr: Internal implementation to handle special-casing patch events
  on ``ColumnDataSource`` columns.
  
  Normally any changes to the ``.data`` dict attribute on a
  ``ColumnDataSource`` triggers a notification, causing all of the data
  to be synchronized between server and clients.
  
  The ``.patch`` method on column data sources exists to provide a
  more efficient way to perform patching (i.e. random access) updates
  to a data source, without having to perform a full synchronization,
  which would needlessly re-send all the data.
  
  To accomplish this, this function bypasses the wrapped methods on
  ``PropertyValueDict`` and uses the unwrapped versions on the dict
  superclass directly. It then explicitly makes a notification, adding
  a special ``ColumnsPatchedEvent`` hint to the message containing
  only the small patched data that BokehJS needs in order to efficiently
  synchronize.
  
  .. warning::
      This function assumes the integrity of ``patches`` has already
      been verified.
docstr_tok: ["Internal","implementation","to","handle","special-casing","patch","events","on","``","ColumnDataSource","``","columns",".","Normally","any","changes","to","the","``",".data","``","dict","attribute","on","a","``","ColumnDataSource","``","triggers","a","notification",",","causing","all","of","the","data","to","be","synchronized","between","server","and","clients",".","The","``",".patch","``","method","on","column","data","sources","exists","to","provide","a","more","efficient","way","to","perform","patching","(","i.e",".","random","access",")","updates","to","a","data","source",",","without","having","to","perform","a","full","synchronization",",","which","would","needlessly","re-send","all","the","data",".","To","accomplish","this",",","this","function","bypasses","the","wrapped","methods","on","``","PropertyValueDict","``","and","uses","the","unwrapped","versions","on","the","dict","superclass","directly",".","It","then","explicitly","makes","a","notification",",","adding","a","special","``","ColumnsPatchedEvent","``","hint","to","the","message","containing","only","the","small","patched","data","that","BokehJS","needs","in","order","to","efficiently","synchronize",".","..","warning",":",":","This","function","assumes","the","integrity","of","``","patches","``","has","already","been","verified","."]
code: def _patch(
      self,
      doc: Document,
      source: ColumnarDataSource,
      patches,
      setter: Setter | None = None,
  ) -> None:
      """Internal implementation to handle special-casing patch events
      on ``ColumnDataSource`` columns.
  
      Normally any changes to the ``.data`` dict attribute on a
      ``ColumnDataSource`` triggers a notification, causing all of the data
      to be synchronized between server and clients.
  
      The ``.patch`` method on column data sources exists to provide a
      more efficient way to perform patching (i.e. random access) updates
      to a data source, without having to perform a full synchronization,
      which would needlessly re-send all the data.
  
      To accomplish this, this function bypasses the wrapped methods on
      ``PropertyValueDict`` and uses the unwrapped versions on the dict
      superclass directly. It then explicitly makes a notification, adding
      a special ``ColumnsPatchedEvent`` hint to the message containing
      only the small patched data that BokehJS needs in order to efficiently
      synchronize.
  
      .. warning::
          This function assumes the integrity of ``patches`` has already
          been verified.
  
      """
      old = self._saved_copy()
  
      for name, patch in patches.items():
          for ind, value in patch:
              if isinstance(ind, (int, slice)):
                  self[name][ind] = value
              else:
                  shape = self[name][ind[0]][tuple(ind[1:])].shape
                  self[name][ind[0]][tuple(ind[1:])] = np.array(
                      value, copy=False
                  ).reshape(shape)
  
      from ...document.events import ColumnsPatchedEvent
  
      self._notify_owners(
          old,
          hint=ColumnsPatchedEvent(
              doc, source, "data", patches, setter
          ),
      )
  
imports: from __future__ import annotations
  import logging
  import copy
  from typing import TYPE_CHECKING, Any, Iterable, TypeVar
  import numpy
label_desc: Use image node_id 6 for calling the PropertyValueColumnData obj's underlying member method code with example usage: obj._patch(doc, source, patches, setter) without return types