code: def assert_durations_plot(plot, names):
      """Checks the layout of a regrets plot"""
      assert plot.layout.title.text == "Time to result"
      assert (
          plot.layout.xaxis.title.text
          == "Experiment duration by second(s)"
      )
      assert plot.layout.yaxis.title.text == "loss"
  
      line_plots = plot.data
  
      assert len(line_plots) == len(names)
  
      for name, trace in zip([name for name in names], line_plots):
          assert trace.type == "scatter"
          assert trace.name == name
          assert trace.mode == "lines+markers"
  
file_path: orion/src/orion/testing/plotting.py
label_desc: Use image node_id 4 for calling a global function with example usage: assert_durations_plot(plot, names) without return types