code: def test_observations_env_spec_mismatch_batch(batch_data):
      with pytest.raises(
          ValueError, match="Each observation has shape"
      ):
          batch_data["observations"] = batch_data["observations"][
              :, :, :, :1
          ]
          s = TimeStepBatch(**batch_data)
          del s
  
      obs_space = akro.Box(
          low=1, high=10, shape=(4, 5, 2), dtype=np.float32
      )
      act_space = gym.spaces.MultiDiscrete([2, 5])
      env_spec = EnvSpec(obs_space, act_space)
      batch_data["env_spec"] = env_spec
  
      with pytest.raises(
          ValueError, match="Each observation has shape"
      ):
          batch_data["observations"] = batch_data["observations"][
              :, :, :, :1
          ]
          s = TimeStepBatch(**batch_data)
          del s
  
imports: import akro
  import gym.spaces
  import numpy
  import pytest
  from garage import EnvSpec, EnvStep, EpisodeBatch, StepType, TimeStep, TimeStepBatch
label_desc: Use image node_id 32 for calling a global function with example usage: test_observations_env_spec_mismatch_batch(batch_data) without return types