code: def test_median_aggregation():
      x = torch.tensor(
          [
              [0.0, 1.0, 2.0],
              [3.0, 4.0, 5.0],
              [6.0, 7.0, 8.0],
              [9.0, 0.0, 1.0],
              [2.0, 3.0, 4.0],
              [5.0, 6.0, 7.0],
              [8.0, 9.0, 0.0],
              [1.0, 2.0, 3.0],
              [4.0, 5.0, 6.0],
              [7.0, 8.0, 9.0],
          ]
      )
  
      aggr = MedianAggregation()
      assert str(aggr) == "MedianAggregation()"
  
      index = torch.tensor([0, 0, 0, 0, 1, 1, 1, 2, 2, 2])
      assert aggr(x, index).tolist() == [
          [3.0, 1.0, 2.0],
          [5.0, 6.0, 4.0],
          [4.0, 5.0, 6.0],
      ]
  
      index = torch.tensor([0, 1, 0])
      assert aggr(x, index, dim=1).tolist() == [
          [0.0, 1.0],
          [3.0, 4.0],
          [6.0, 7.0],
          [1.0, 0.0],
          [2.0, 3.0],
          [5.0, 6.0],
          [0.0, 9.0],
          [1.0, 2.0],
          [4.0, 5.0],
          [7.0, 8.0],
      ]
  
imports: import pytest
  import torch
  from torch_geometric.nn import MedianAggregation, QuantileAggregation
label_desc: Use image node_id 2 for calling a global function with example usage: test_median_aggregation() without return types