docstr: Test that a ValueError is raised if attempting to serialize an unsupported operator.
docstr_tok: ["Test","that","a","ValueError","is","raised","if","attempting","to","serialize","an","unsupported","operator","."]
code: def test_value_init_not_supported(self):
      """Test that a ValueError is raised if attempting to serialize an unsupported operator."""
  
      class NotSupported(
          Operator
      ):  # pylint: disable=too-few-public-methods
          """An operator."""
  
          ...
  
      with pytest.raises(
          TypeError,
          match="Serialization of operator type 'NotSupported' is not supported",
      ):
          DatasetOperator(NotSupported(1))
  
file_path: pennylane/tests/data/attributes/operator/test_operator.py
imports: import itertools
  import numpy
  import pytest
  import pennylane
  from pennylane.data.attributes import DatasetOperator
  from pennylane.data.base.typing_util import get_type_str
  from pennylane.operation import Operator, Tensor
label_desc: Use image node_id 2 for calling the TestDatasetOperator obj's underlying member method code with example usage: obj.test_value_init_not_supported() without return types