code: def test_nested_frames(self):
      with self.assertRaisesRegex(ValueError, "frames"):
          go.Figure({"frames": [{"frames": []}]})
  
      figure = go.Figure()
      figure.frames = [{}]
  
      with self.assertRaisesRegex(ValueError, "frames"):
          figure.to_plotly_json()["frames"][0]["frames"] = []
          figure.frames[0].frames = []
  
imports: import plotly.graph_objects
  from plotly.subplots import make_subplots
  from plotly.tests.utils import TestCaseNoTemplate
  import pytest
label_desc: Use image node_id 4 for calling the FigureTest obj's underlying member method code with example usage: obj.test_nested_frames() without return types