code: def _test_cases_dgl(self, g):
      # simple test to see if DGL graph was set during different featurization + umap strategies
      G = g._dgl_graph
      keys = ["feature", "target", "train_mask", "test_mask"]
      keys_without_target = ["feature", "train_mask", "test_mask"]
  
      use_node_target = True
      use_edge_target = True
  
      if len(G.ndata.keys()) == 3:
          use_node_target = False
          self.assertSequenceEqual(
              list(G.ndata.keys()), keys_without_target
          )
      else:
          self.assertSequenceEqual(list(G.ndata.keys()), keys)
      if len(G.edata.keys()) == 3:
          use_edge_target = False
          self.assertSequenceEqual(
              list(G.edata.keys()), keys_without_target
          )
      else:
          self.assertSequenceEqual(list(G.edata.keys()), keys)
      if use_node_target:
          for k in keys:
              assert isinstance(
                  G.ndata[k].sum(), torch.Tensor
              ), f"Node {G.ndata[k]} for {k} is not a Tensor"
      else:
          for k in keys_without_target:
              assert isinstance(
                  G.ndata[k].sum(), torch.Tensor
              ), f"Node {G.ndata[k]} for {k} is not a Tensor"
      if use_edge_target:
          for k in keys:
              assert isinstance(
                  G.edata[k].sum(), torch.Tensor
              ), f"Edge {G.edata[k]} for {k} is not a Tensor"
      else:
          for k in keys_without_target:
              assert isinstance(
                  G.ndata[k].sum(), torch.Tensor
              ), f"Node {G.ndata[k]} for {k} is not a Tensor"
  
file_path: pygraphistry/graphistry/tests/test_dgl_utils.py
imports: import unittest
  import pytest
  import graphistry
  import pandas
  from graphistry.util import setup_logger
  from graphistry.dgl_utils import lazy_dgl_import_has_dependency
label_desc: Use image node_id 1 for calling the TestDGL obj's underlying member method code with example usage: obj._test_cases_dgl(g) without return types