code: def check_dgl_blocks_homo(minibatch, blocks):
      sampled_csc = [
          subgraph.sampled_csc
          for subgraph in minibatch.sampled_subgraphs
      ]
      original_edge_ids = [
          subgraph.original_edge_ids
          for subgraph in minibatch.sampled_subgraphs
      ]
      original_row_node_ids = [
          subgraph.original_row_node_ids
          for subgraph in minibatch.sampled_subgraphs
      ]
      for i, block in enumerate(blocks):
          dst_ndoes = torch.arange(
              0, len(sampled_csc[i].indptr) - 1
          ).repeat_interleave(sampled_csc[i].indptr.diff())
          assert torch.equal(
              block.edges()[0], sampled_csc[i].indices
          ), print(block.edges())
          assert torch.equal(block.edges()[1], dst_ndoes), print(
              block.edges()
          )
          assert torch.equal(
              block.edata[dgl.EID], original_edge_ids[i]
          ), print(block.edata[dgl.EID])
      assert torch.equal(
          blocks[0].srcdata[dgl.NID], original_row_node_ids[0]
      ), print(blocks[0].srcdata[dgl.NID])
  
file_path: dgl/tests/python/pytorch/graphbolt/impl/test_minibatch.py
imports: import dgl
  import dgl.graphbolt
  import pytest
  import torch
label_desc: Use image node_id 9 for calling a global function with example usage: check_dgl_blocks_homo(minibatch, blocks) without return types