code: def get_moments(x):
      assert (x > 0).all()
      x = x.log()
      m1 = x.mean(0)
      x = x - m1
      xx = x * x
      xxx = x * xx
      xxxx = xx * xx
      m2 = xx.mean(0)
      m3 = xxx.mean(0) / m2**1.5
      m4 = xxxx.mean(0) / m2**2
      return torch.stack([m1, m2, m3, m4])
  
file_path: pyro/tests/infer/reparam/test_transform.py
imports: import pytest
  import torch
  import pyro
  import pyro.distributions
  import pyro.poutine
  from pyro.distributions.transforms import AffineTransform, ExpTransform
  from pyro.infer.reparam import TransformReparam
  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