code: def assert_update_subplots(
      self,
      subplot_type,
      subplots_name,
      expected_nums,
      patch=None,
      selector=None,
      row=None,
      col=None,
      secondary_y=None,
      test_no_grid=False,
      **kwargs,
  ):
      update_fn = getattr(Figure, "update_" + subplots_name)
  
      if secondary_y is not None:
          secy_kwargs = dict(secondary_y=secondary_y)
      else:
          secy_kwargs = {}
  
      def check_update(fig):
          # Copy input figure so that we don't modify it
          fig_orig = fig
          fig = copy.deepcopy(fig)
  
          # perform update_*
          update_res = update_fn(
              fig,
              patch,
              selector=selector,
              row=row,
              col=col,
              **dict(kwargs, **secy_kwargs),
          )
  
          self.assertIs(update_res, fig)
  
          # Build expected layout keys
          expected_keys = [
              subplot_type + (str(cnt) if cnt > 1 else "")
              for cnt in expected_nums
          ]
  
          # Iterate over all layout keys
          for k in fig.layout:
              orig_obj = copy.deepcopy(fig_orig.layout[k])
              new_obj = fig.layout[k]
              if k in expected_keys:
                  # Make sure sure there is an initial difference
                  self.assertNotEqual(orig_obj, new_obj)
                  orig_obj.update(patch, **kwargs)
  
              self.assertEqual(new_obj, orig_obj)
  
      check_update(self.fig)
      if test_no_grid:
          check_update(self.fig_no_grid)
  
imports: import copy
  from unittest import TestCase
  import plotly.graph_objs
  from plotly.graph_objs import Figure
  from plotly.subplots import make_subplots
label_desc: Use image node_id 8 for calling the TestSelectForEachUpdateSubplots obj's underlying member method code with example usage: obj.assert_update_subplots(subplot_type, subplots_name, expected_nums, patch, selector, row, col, secondary_y, test_no_grid) without return types