code: def assert_update(
      self,
      prop,
      inds,
      patch,
      selector=None,
      row=None,
      col=None,
      secondary_y=None,
  ):
      # Copy figure and perform update
      prefix = "layout_" if prop == "images" else ""
      fig_orig = go.Figure(self.fig)
      fig = go.Figure(self.fig)
      fn = getattr(fig, "update_" + prefix + prop)
      fn(
          patch,
          selector=selector,
          row=row,
          col=col,
          secondary_y=secondary_y,
      )
  
      # Get original up updated object lis
      objs_orig = fig_orig.layout[prop]
      objs = fig.layout[prop]
  
      for i, (obj, obj_orig) in enumerate(zip(objs, objs_orig)):
          if i in inds:
              # Check that object changed from original
              self.assertNotEqual(obj, obj_orig)
  
              # Apply update to original and check that they match now
              obj_orig.update(patch)
              self.assertEqual(obj, obj_orig)
          else:
              # Check object unchanged
              self.assertEqual(obj, obj_orig)
  
imports: import types
  from unittest import TestCase
  import plotly.graph_objs
  from plotly.subplots import make_subplots
  import pytest
label_desc: Use image node_id 3 for calling the TestSelectForEachUpdateAnnotations obj's underlying member method code with example usage: obj.assert_update(prop, inds, patch, selector, row, col, secondary_y) without return types