code: def test_linear_regression(posterior):
      fit = posterior.sample(num_chains=4)
      assert len(fit) == 2  # two parameters (beta, sigma)
      assert 0 < fit["sigma"].mean() < 2
      assert np.allclose(fit["beta"].mean(axis=1), beta_true, atol=0.05)
  
imports: import numpy
  import pytest
  import stan
label_desc: Use image node_id 2 for calling a global function with example usage: test_linear_regression(posterior) without return types