code: def test_array_filter(idtype):
      f = Filter(
          F.copy_to(
              F.tensor([0, 1, 9, 4, 6, 5, 7], dtype=idtype), F.ctx()
          )
      )
      x = F.copy_to(F.tensor([0, 3, 9, 11], dtype=idtype), F.ctx())
      y = F.copy_to(
          F.tensor([0, 19, 0, 28, 3, 9, 11, 4, 5], dtype=idtype),
          F.ctx(),
      )
  
      xi_act = f.find_included_indices(x)
      xi_exp = F.copy_to(F.tensor([0, 2], dtype=idtype), F.ctx())
      assert F.array_equal(xi_act, xi_exp)
      xe_act = f.find_excluded_indices(x)
      xe_exp = F.copy_to(F.tensor([1, 3], dtype=idtype), F.ctx())
      assert F.array_equal(xe_act, xe_exp)
  
      yi_act = f.find_included_indices(y)
      yi_exp = F.copy_to(
          F.tensor([0, 2, 5, 7, 8], dtype=idtype), F.ctx()
      )
      assert F.array_equal(yi_act, yi_exp)
      ye_act = f.find_excluded_indices(y)
      ye_exp = F.copy_to(F.tensor([1, 3, 4, 6], dtype=idtype), F.ctx())
      assert F.array_equal(ye_act, ye_exp)
  
file_path: dgl/tests/python/common/utils/test_filter.py
imports: import unittest
  import backend
  import dgl
  import numpy
  from dgl.utils import Filter
  from utils import parametrize_idtype
label_desc: Use image node_id 2 for calling a global function with example usage: test_array_filter(idtype) without return types