code: def test_raise_if_no_figure(self):
      scatt = go.Scatter()
      fn = MagicMock()
      with pytest.raises(ValueError):
          scatt.on_change(fn, "x")
  
imports: import sys
  from unittest import TestCase
  import pytest
  import plotly.graph_objs
label_desc: Use image node_id 2 for calling the TestOnChangeCallbacks obj's underlying member method code with example usage: obj.test_raise_if_no_figure() without return types