code: def test_html(monkeypatch, single_with_trials):
      """Test html is saved properly"""
  
      def mock_html(*args, **kwargs):
          mock_html.called = True
          return ""
  
      mock_html.called = False
  
      monkeypatch.setattr(
          "plotly.graph_objs._figure.Figure.write_html", mock_html
      )
  
      returncode = orion.core.cli.main(
          [
              "plot",
              "regret",
              "--name",
              "test_single_exp",
              "--type",
              "html",
          ]
      )
      assert returncode == 0
  
      assert mock_html.called
  
imports: import random
  import pytest
  import orion.core.cli
  import orion.plotting.backend_plotly
  from orion.core.cli.plot import IMAGE_TYPES, VALID_TYPES
  from orion.plotting.base import SINGLE_EXPERIMENT_PLOTS
  from orion.storage.base import setup_storage
  from orion.testing import AssertNewFile
label_desc: Use image node_id 14 for calling a global function with example usage: test_html(monkeypatch, single_with_trials) and returns: str