code: def test_norm_by_dst(idtype):
      # Case1: A homogeneous graph
      g = dgl.graph(
          ([0, 1, 1], [1, 1, 2]), idtype=idtype, device=F.ctx()
      )
      eweight = dgl.norm_by_dst(g)
      assert F.allclose(eweight, F.tensor([0.5, 0.5, 1.0]))
  
      # Case2: A heterogeneous graph
      g = dgl.heterograph(
          {
              ("user", "follows", "user"): ([0, 1], [1, 2]),
              ("user", "plays", "game"): ([0, 1, 1], [1, 1, 2]),
          },
          idtype=idtype,
          device=F.ctx(),
      )
      eweight = dgl.norm_by_dst(g, etype=("user", "plays", "game"))
      assert F.allclose(eweight, F.tensor([0.5, 0.5, 1.0]))
  
imports: import math
  import os
  import unittest
  import backend
  import dgl
  import dgl.function
  import dgl.partition
  import networkx
  import numpy
  import pytest
  from scipy import sparse
  from utils import parametrize_idtype
  from utils.graph_cases import get_cases
label_desc: Use image node_id 32 for calling a global function with example usage: test_norm_by_dst(idtype) without return types