code: def test_get_by_path(self):
      # should be able to traverse into a nested dict/list with key array
  
      figure = {"data": [{}, {"marker": {"color": ["red", "blue"]}}]}
      path = ("data", 1, "marker", "color")
      value = get_by_path(figure, path)
      expected_value = ["red", "blue"]
      self.assertEqual(value, expected_value)
  
file_path: plotly.py/packages/python/plotly/plotly/tests/test_core/test_utils/test_utils.py
imports: from unittest import TestCase
  from plotly.utils import PlotlyJSONEncoder, get_by_path, node_generator
  import json
label_desc: Use image node_id 1 for calling the TestGetByPath obj's underlying member method code with example usage: obj.test_get_by_path() without return types