code: def test_add_annotations(self):
      # Paper annotation
      self.fig.add_annotation(text="A", yref="paper")
      annot = self.fig.layout.annotations[-1]
      self.assertEqual(annot.text, "A")
      self.assertEqual(annot.xref, None)
      self.assertEqual(annot.yref, "paper")
  
      # (1, 1) annotation
      self.fig.add_annotation(text="B", row=1, col=1)
      annot = self.fig.layout.annotations[-1]
      self.assertEqual(annot.text, "B")
      self.assertEqual(annot.xref, "x")
      self.assertEqual(annot.yref, "y")
  
      # (1, 2) annotation, primary y-axis
      self.fig.add_annotation(text="C1", row=1, col=2)
      annot = self.fig.layout.annotations[-1]
      self.assertEqual(annot.text, "C1")
      self.assertEqual(annot.xref, "x2")
      self.assertEqual(annot.yref, "y2")
  
      # (1, 2) annotation, secondary y-axis
      self.fig.add_annotation(text="C2", row=1, col=2, secondary_y=True)
      annot = self.fig.layout.annotations[-1]
      self.assertEqual(annot.text, "C2")
      self.assertEqual(annot.xref, "x2")
      self.assertEqual(annot.yref, "y3")
  
      # (2, 1) annotation
      self.fig.add_annotation(text="D", row=2, col=1)
      annot = self.fig.layout.annotations[-1]
      self.assertEqual(annot.text, "D")
      self.assertEqual(annot.xref, "x3")
      self.assertEqual(annot.yref, "y4")
  
      # Try to add to (2, 2), which not a valid
      with self.assertRaisesRegex(ValueError, "of type polar"):
          self.fig.add_annotation(text="D", row=2, col=2)
  
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 5 for calling the TestSelectForEachUpdateAnnotations obj's underlying member method code with example usage: obj.test_add_annotations() without return types