code: def update_graph(
      self, scheduler, dsk=None, keys=None, restrictions=None, **kwargs
  ):
      annots = kwargs["annotations"]
  
      if "priority" in annots:
          self.priority_matches = sum(
              int(self.priority_fn(k) == p)
              for k, p in annots["priority"].items()
          )
  
      if "qux" in annots:
          self.qux_matches = sum(
              int(self.qux == v) for v in annots["qux"].values()
          )
  
      if "custom_resource" in annots:
          self.resource_matches = sum(
              int(self.resource == v)
              for v in annots["custom_resource"].values()
          )
  
      if "retries" in annots:
          self.retry_matches = sum(
              int(self.retries == v) for v in annots["retries"].values()
          )
  
file_path: distributed/distributed/protocol/tests/test_highlevelgraph.py
imports: from __future__ import annotations
  import pytest
  from numpy.testing import assert_array_equal
  import dask
  import dask.array
  import dask.dataframe
  from distributed.diagnostics import SchedulerPlugin
  from distributed.utils_test import gen_cluster
label_desc: Use image node_id 2 for calling the ExampleAnnotationPlugin obj's underlying member method code with example usage: obj.update_graph(scheduler, dsk, keys, restrictions) without return types