code: def test_remove_isolated_nodes():
      assert str(RemoveIsolatedNodes()) == "RemoveIsolatedNodes()"
  
      data = Data()
      data.x = torch.arange(3)
      data.edge_index = torch.tensor([[0, 2], [2, 0]])
      data.edge_attr = torch.arange(2)
  
      data = RemoveIsolatedNodes()(data)
  
      assert len(data) == 3
      assert data.x.tolist() == [0, 2]
      assert data.edge_index.tolist() == [[0, 1], [1, 0]]
      assert data.edge_attr.tolist() == [0, 1]
  
imports: import torch
  from torch_geometric.data import Data, HeteroData
  from torch_geometric.transforms import RemoveIsolatedNodes
label_desc: Use image node_id 1 for calling a global function with example usage: test_remove_isolated_nodes() without return types