code: def assert_regret_plot(plot):
      """Checks the layout of a regret plot"""
      assert (
          plot.layout.title.text
          == "Regret for experiment 'experiment-name'"
      )
      assert (
          plot.layout.xaxis.title.text
          == "Trials ordered by suggested time"
      )
      assert plot.layout.yaxis.title.text == "Objective 'loss'"
  
      trace1 = plot.data[0]
      assert trace1.type == "scatter"
      assert trace1.name == "trials"
      assert trace1.mode == "markers"
      assert len(trace1.y) == 1
      assert not trace1.x
  
      trace2 = plot.data[1]
      assert trace2.type == "scatter"
      assert trace2.name == "best-to-date"
      assert trace2.mode == "lines"
      assert len(trace2.y) == 1
      assert not trace2.x
  
file_path: orion/src/orion/testing/plotting.py
label_desc: Use image node_id 1 for calling a global function with example usage: assert_regret_plot(plot) without return types