code: def test_tensor_attr():
      ta = CuGraphTensorAttr("group0", "property1")
      assert not ta.is_fully_specified()
      assert not ta.is_set("index")
  
      ta.fully_specify()
      assert ta.is_fully_specified()
  
      other_ta = CuGraphTensorAttr(index=[1, 2, 3])
      ta.update(other_ta)
      assert ta.index == [1, 2, 3]
  
      casted_ta1 = CuGraphTensorAttr.cast(ta)
      assert casted_ta1 == ta
  
      casted_ta2 = CuGraphTensorAttr.cast(index=[1, 2, 3])
      assert casted_ta2.index == [1, 2, 3]
      assert not casted_ta2.is_fully_specified()
  
      casted_ta3 = CuGraphTensorAttr.cast(
          "group2",
          "property2",
          [1, 2, 3],
      )
      assert casted_ta3.group_name == "group2"
      assert casted_ta3.attr_name == "property2"
      assert casted_ta3.index == [1, 2, 3]
  
imports: import cugraph
  from cugraph_pyg.data.cugraph_store import CuGraphTensorAttr, CuGraphEdgeAttr, EdgeLayout
  from cugraph_pyg.data import CuGraphStore
  import cudf
  import dask_cudf
  import cupy
  import numpy
  from cugraph.utilities.utils import import_optional, MissingModule
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_tensor_attr() without return types