code: def test_compose_filters():
      filter_fn = T.ComposeFilters(
          [
              lambda d: d.num_nodes > 2,
              lambda d: d.num_edges > 2,
          ]
      )
      assert str(filter_fn)[:16] == "ComposeFilters(["
  
      data1 = Data(x=torch.arange(3))
      assert not filter_fn(data1)
  
      data2 = Data(
          x=torch.arange(2),
          edge_index=torch.tensor(
              [
                  [0, 0, 1],
                  [0, 1, 1],
              ]
          ),
      )
      assert not filter_fn(data2)
  
      data3 = Data(
          x=torch.arange(3),
          edge_index=torch.tensor(
              [
                  [0, 0, 1],
                  [0, 1, 1],
              ]
          ),
      )
      assert filter_fn(data3)
  
      # Test tuple of data objects:
      assert filter_fn((data1, data2, data3)) is False
  
imports: import torch
  import torch_geometric.transforms
  from torch_geometric.data import Data
label_desc: Use image node_id 3 for calling a global function with example usage: test_compose_filters() without return types