code: def test_edge_attr():
      ea = CuGraphEdgeAttr("type0", EdgeLayout.COO, False, 10)
      assert ea.edge_type == "type0"
      assert ea.layout == EdgeLayout.COO
      assert not ea.is_sorted
      assert ea.size == 10
  
      ea = CuGraphEdgeAttr(
          edge_type="type1", layout="csr", is_sorted=True
      )
      assert ea.size is None
  
      ea = CuGraphEdgeAttr.cast("type0", EdgeLayout.COO, False, 10)
      assert ea.edge_type == "type0"
      assert ea.layout == EdgeLayout.COO
      assert not ea.is_sorted
      assert ea.size == 10
  
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 2 for calling a global function with example usage: test_edge_attr() without return types