code: def sort_samples_in_place(x):
      for key, value in list(x.items()):
          if isinstance(key, str) and key == "samples":
              x[key] = value.sort(0).values
          elif isinstance(value, dict):
              sort_samples_in_place(value)
  
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 2 for calling a global function with example usage: sort_samples_in_place(x) without return types