code: def test_uva_subgraph(idtype, device):
      g = create_test_heterograph2(idtype)
      g = g.to(F.cpu())
      g.create_formats_()
      g.pin_memory_()
      indices = {"user": F.copy_to(F.tensor([0], idtype), device)}
      edge_indices = {
          "follows": F.copy_to(F.tensor([0], idtype), device)
      }
      assert g.subgraph(indices).device == device
      assert g.edge_subgraph(edge_indices).device == device
      assert g.in_subgraph(indices).device == device
      assert g.out_subgraph(indices).device == device
      assert g.khop_in_subgraph(indices, 1)[0].device == device
      assert g.khop_out_subgraph(indices, 1)[0].device == device
      assert g.sample_neighbors(indices, 1).device == device
      g.unpin_memory_()
  
imports: import unittest
  import backend
  import dgl
  import networkx
  import numpy
  import pytest
  import scipy.sparse
  from utils import parametrize_idtype
label_desc: Use image node_id 15 for calling a global function with example usage: test_uva_subgraph(idtype, device) without return types