code: def test_update_merge_get(make_stats, left_size, right_size):
      left_samples = generate_data(left_size)
      right_samples = generate_data(right_size)
  
      expected_stats = make_stats()
      for sample in left_samples + right_samples:
          expected_stats.update(sample)
      expected = expected_stats.get()
  
      left_stats = make_stats()
      for sample in left_samples:
          left_stats.update(sample)
      right_stats = make_stats()
      for sample in right_samples:
          right_stats.update(sample)
      actual_stats = left_stats.merge(right_stats)
      assert isinstance(actual_stats, type(expected_stats))
  
      actual = actual_stats.get()
      assert_close(actual, expected)
  
file_path: pyro/tests/ops/test_streaming.py
imports: import functools
  import pytest
  import torch
  from pyro.ops.streaming import CountMeanStats, CountMeanVarianceStats, CountStats, StackStats, StatsOfDict
  from tests.common import assert_close
label_desc: Use image node_id 4 for calling a global function with example usage: test_update_merge_get(make_stats, left_size, right_size) without return types