code: def _assert_container_equal(lhs, rhs):
      if isinstance(lhs, torch.Tensor):
          assert isinstance(rhs, torch.Tensor)
          assert torch.equal(lhs, rhs)
      elif isinstance(lhs, tuple):
          assert isinstance(rhs, tuple)
          assert len(lhs) == len(rhs)
          for l, r in zip(lhs, rhs):
              _assert_container_equal(l, r)
      elif isinstance(lhs, gb.CSCFormatBase):
          assert isinstance(rhs, gb.CSCFormatBase)
          assert len(lhs.indptr) == len(rhs.indptr)
          assert len(lhs.indices) == len(rhs.indices)
          _assert_container_equal(lhs.indptr, rhs.indptr)
          _assert_container_equal(lhs.indices, rhs.indices)
      elif isinstance(lhs, dict):
          assert isinstance(rhs, dict)
          assert len(lhs) == len(rhs)
          for key, value in lhs.items():
              assert key in rhs
              _assert_container_equal(value, rhs[key])
  
file_path: dgl/tests/python/pytorch/graphbolt/impl/test_sampled_subgraph_impl.py
imports: import unittest
  import backend
  import dgl.graphbolt
  import pytest
  import torch
  from dgl.graphbolt.impl.sampled_subgraph_impl import SampledSubgraphImpl
label_desc: Use image node_id 1 for calling a global function with example usage: _assert_container_equal(lhs, rhs) without return types