code: def test_ewma_log():
      ewma_log = EwmaLog(alpha=0.5)
      input1 = torch.tensor(2.0)
      ewma_log(input1, torch.tensor(0.0))
      assert_equal(ewma_log.ewma, input1)
      input2 = torch.tensor(3.0)
      ewma_log(input2, torch.tensor(0.0))
      assert_equal(ewma_log.ewma, torch.tensor(8.0 / 3))
  
file_path: pyro/tests/contrib/oed/test_ewma.py
imports: import math
  import pytest
  import torch
  from pyro.contrib.oed.eig import EwmaLog
  from tests.common import assert_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_ewma_log() without return types