code: def test_type(out_type, single_with_trials):
      """Test that given type of image is used properly"""
  
      filename = f"test_single_exp-v1_regret.{out_type}"
      with AssertNewFile(filename):
          returncode = orion.core.cli.main(
              [
                  "plot",
                  "regret",
                  "--name",
                  "test_single_exp",
                  "--type",
                  out_type,
              ]
          )
          assert returncode == 0
  
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 7 for calling a global function with example usage: test_type(out_type, single_with_trials) without return types