code: def test_flatten_unflatten():
      """Test the flatten and unflatten methods."""
      op = qml.FlipSign([0, 1], wires=2)
      data, metadata = op._flatten()
  
      assert data == tuple()
      hyperparameters = (("n", (0, 1)),)
      assert metadata == (op.wires, hyperparameters)
  
      # make sure metadata hasable
      assert hash(metadata)
  
      new_op = type(op)._unflatten(*op._flatten())
      # data casted to tuple. unimportant difference
      assert qml.equal(qml.FlipSign((0, 1), wires=2), new_op)
      assert op is not new_op
  
file_path: pennylane/tests/templates/test_subroutines/test_flip_sign.py
imports: import pytest
  from pennylane import numpy
  import pennylane
label_desc: Use image node_id 3 for calling a global function with example usage: test_flatten_unflatten() without return types