docstr: If the original list is defined, a dict from
  index numbers to property dicts may be used to update select
  elements of the existing list
docstr_tok: ["If","the","original","list","is","defined",",","a","dict","from","index","numbers","to","property","dicts","may","be","used","to","update","select","elements","of","the","existing","list"]
code: def test_update_initialized_nonempty_list_with_dict(self):
      """
      If the original list is defined, a dict from
      index numbers to property dicts may be used to update select
      elements of the existing list
      """
      layout = go.Layout(
          annotations=[
              go.layout.Annotation(text="one"),
              go.layout.Annotation(text="two"),
          ]
      )
  
      layout.update(annotations={1: go.layout.Annotation(width=30)})
  
      expected = {
          "annotations": [{"text": "one"}, {"text": "two", "width": 30}]
      }
  
      self.assertEqual(len(layout.annotations), 2)
      self.assertEqual(layout.to_plotly_json(), expected)
  
file_path: plotly.py/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_update.py
imports: from unittest import skip
  import plotly.graph_objs
  from plotly.graph_objs import Data, Figure, Layout, Line, Scatter, scatter, XAxis
  from plotly.tests.utils import strip_dict_params
  from unittest import TestCase
label_desc: Use image node_id 9 for calling the TestUpdateMethod obj's underlying member method code with example usage: obj.test_update_initialized_nonempty_list_with_dict() without return types