code: def test_empirical_from_trace():
      with models.another_simple_model():
          step = pm.Metropolis()
          trace = pm.sample(
              100,
              step=step,
              chains=1,
              tune=0,
              return_inferencedata=False,
          )
          emp = Empirical(trace)
          assert emp.histogram.shape[0].eval() == 100
          trace = pm.sample(
              100,
              step=step,
              chains=4,
              tune=0,
              return_inferencedata=False,
          )
          emp = Empirical(trace)
          assert emp.histogram.shape[0].eval() == 400
  
file_path: pymc/tests/variational/test_approximations.py
imports: import numpy
  import pytensor
  import pytest
  import pymc
  from pymc.variational.approximations import Empirical, MeanField
  from tests import models
label_desc: Use image node_id 2 for calling a global function with example usage: test_empirical_from_trace() without return types