code: def get_nodes_by_ntype(nodes, ntype):
      return dict(
          (k, v) for k, v in nodes.items() if v["ntype"] == ntype
      )
  
file_path: dgl/tests/python/common/test_convert.py
imports: import unittest
  import backend
  import dgl
  from utils import parametrize_idtype
label_desc: Use image node_id 1 for calling a global function with example usage: get_nodes_by_ntype(nodes, ntype) and returns: dict