code: def get_moments(x):
      points = torch.tensor([-4.0, -1.0, 0.0, 1.0, 4.0])
      points = points.reshape((-1,) + (1,) * x.dim())
      return torch.cat(
          [x.mean(0, keepdim=True), (x - points).abs().mean(1)]
      )
  
file_path: pyro/tests/infer/reparam/test_studentt.py
imports: import pytest
  import torch
  from scipy.stats import ks_2samp
  from torch.autograd import grad
  import pyro
  import pyro.distributions
  from pyro import poutine
  from pyro.infer.reparam import StudentTReparam
  from tests.common import assert_close
  from .util import check_init_reparam
label_desc: Use image node_id 1 for calling a global function with example usage: get_moments(x) and returns: torch