code: def test_torch_median_numpy(size, device: Optional[str] = None):
      data = torch.rand(size).to(device)
      assert _torch_median(data) == np.median(data.cpu().numpy())
  
file_path: ignite/tests/ignite/contrib/metrics/regression/test__base.py
imports: from typing import Optional
  import numpy
  import pytest
  import torch
  import ignite.distributed
  from ignite.contrib.metrics.regression._base import _BaseRegression, _torch_median
label_desc: Use image node_id 2 for calling a global function with example usage: test_torch_median_numpy(size, device) without return types