code: def test_readonly_attributes(attr):
      """Test read-only attributes."""
      task = BaseTask(target="class_val", metadata=gunpoint)
      with raises(AttributeError):
          task.__setattr__(attr, "val")
  
imports: import pytest
  from pytest import raises
  from sktime.benchmarking.tasks import BaseTask, TSCTask, TSRTask
  from sktime.datasets import load_gunpoint, load_shampoo_sales
label_desc: Use image node_id 1 for calling a global function with example usage: test_readonly_attributes(attr) without return types