code: def test_subtract():
      X = Uniform(0, 1).rv  # (0, 1)
      X = 1 - X  # (0, 1)
      X = X - 1  # (-1, 0)
      X -= 1  # (-2, -1)
      x = X.dist.sample([N_SAMPLES])
      assert ((-2 <= x) & (x <= -1)).all().item()
  
file_path: pyro/tests/contrib/randomvariable/test_random_variable.py
imports: import math
  import torch
  from pyro.distributions import Uniform
label_desc: Use image node_id 2 for calling a global function with example usage: test_subtract() without return types