class_docstr: Pytree related checks.
class_docstr_tok: ["Pytree","related","checks","."]
docstr: Assert that an error is raised if metadata is not hashable.
docstr_tok: ["Assert","that","an","error","is","raised","if","metadata","is","not","hashable","."]
code: def test_not_hashable_metadata(self):
      """Assert that an error is raised if metadata is not hashable."""
  
      class BadMetadata(Operator):
          def __init__(self, wires):
              super().__init__(wires)
              self.hyperparameters["test"] = ["a"]
  
      op = BadMetadata(0)
      with pytest.raises(
          AssertionError,
          match=r"metadata output from _flatten must be hashable",
      ):
          assert_valid(op, skip_pickle=True)
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.operation import Operator
  from pennylane.ops.functions import assert_valid
label_desc: Use image node_id 1 for calling the TestPytree obj's underlying member method code with example usage: obj.test_not_hashable_metadata() without return types