code: def test_back_compat(seed=1234):
      np.random.seed(seed)
      coords = np.random.randn(16, 3)
      log_prob = np.random.randn(len(coords))
      blobs = np.random.randn(len(coords))
      rstate = np.random.get_state()
  
      state = State(coords, log_prob, blobs, rstate)
      c, l, r, b = state
      assert np.allclose(coords, c)
      assert np.allclose(log_prob, l)
      assert np.allclose(blobs, b)
      check_rstate(rstate, r)
  
      state = State(coords, log_prob, None, rstate)
      c, l, r = state
      assert np.allclose(coords, c)
      assert np.allclose(log_prob, l)
      check_rstate(rstate, r)
  
file_path: emcee/src/emcee/tests/unit/test_state.py
imports: import numpy
  import pytest
  from emcee import EnsembleSampler
  from emcee.state import State
label_desc: Use image node_id 2 for calling a global function with example usage: test_back_compat(seed) without return types