code: def test_raise_id_restraint():
      """Test to ensure ID format is raised for malformed input ID."""
      # format of the form [username/](entity-name)-v(major).(minor)
      id_format = r"^(?:[\w:-]+\/)?([\w:.\-{}=\[\]]+)-v([\d.]+)$"
      error_msg = "Attempted to register malformed entity ID"
      benchmark = benchmarks.BaseBenchmark(id_format)
      with pytest.raises(ValueError) as exc_info:
          benchmark.add_estimator(NaiveForecaster(), "test_id")
      assert exc_info.type is ValueError, "Must raise a ValueError"
      assert (
          error_msg in exc_info.value.args[0]
      ), "Error msg is not raised"
  
file_path: sktime/sktime/benchmarking/tests/test_benchmarks.py
imports: from typing import Callable
  import pandas
  import pytest
  from sktime.base import BaseEstimator
  from sktime.benchmarking import benchmarks
  from sktime.forecasting.naive import NaiveForecaster
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 6 for calling a global function with example usage: test_raise_id_restraint() without return types