class_docstr: Tests for DatasetAttribute.
docstr: Test that a Warning is raised if an subclass captures the same
  type as another
code: def test_conflicting_consumes_types(self):
      """Test that a Warning is raised if an subclass captures the same
      type as another"""
  
      class MyType:  # pylint: disable=too-few-public-methods
          pass
  
      class Attribute(
          DatasetAttribute
      ):  # pylint: disable=unused-variable, too-few-public-methods
          """An attribute"""
  
          type_id = "_attr_2_"
  
          @classmethod
          def consumes_types(cls):
              return (MyType,)
  
      with pytest.warns(
          Warning,
          match="Conflicting default types: Both 'Conflicting' and 'Attribute' consume type 'MyType'. 'MyType' will now be consumed by 'Conflicting'",
      ):
  
          class Conflicting(
              DatasetAttribute
          ):  # pylint: disable=too-few-public-methods
              """A conflicting attribute"""
  
              type_id = "_attr_3_"
  
              @classmethod
              def consumes_types(cls):
                  return (MyType,)
  
          assert match_obj_type(MyType) is Conflicting
  
imports: from copy import copy, deepcopy
  from typing import Any, Iterable, List
  import numpy
  import pytest
  from pennylane.data.attributes import DatasetArray, DatasetList, DatasetNone, DatasetOperator, DatasetScalar, DatasetSparseArray, DatasetString, DatasetTuple
  from pennylane.data.base.attribute import UNSET, AttributeInfo, DatasetAttribute, attribute, match_obj_type
  from pennylane.data.base.hdf5 import HDF5Group, create_group
label_desc: Use image node_id 10 for calling the TestAttribute obj's underlying member method code with example usage: obj.test_conflicting_consumes_types() and returns: MyType, MyType