code: def test_attribute(val, attribute_type):
      """Test that attribute() returns the correct attribute type
      for values."""
      dset_attr = attribute(val)
  
      assert isinstance(dset_attr, attribute_type)
      assert dset_attr.get_value() == val
  
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 3 for calling a global function with example usage: test_attribute(val, attribute_type) without return types