docstr: Test that a DatasetOperator can be bind-initialized
  from an operator, and that the deserialized operator
  is equivalent.
docstr_tok: ["Test","that","a","DatasetOperator","can","be","bind-initialized","from","an","operator",",","and","that","the","deserialized","operator","is","equivalent","."]
code: def test_bind_init(self, op_in):
      """Test that a DatasetOperator can be bind-initialized
      from an operator, and that the deserialized operator
      is equivalent."""
      bind = DatasetOperator(op_in).bind
  
      dset_op = DatasetOperator(bind=bind)
  
      assert dset_op.info["type_id"] == "operator"
      assert dset_op.info["py_type"] == get_type_str(type(op_in))
  
      op_out = dset_op.get_value()
      assert repr(op_out) == repr(op_in)
      assert op_in.data == op_out.data
      assert op_in.wires == op_out.wires
      assert repr(op_in) == repr(op_out)
  
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 3 for calling the TestDatasetOperator obj's underlying member method code with example usage: obj.test_bind_init(op_in) without return types