code: def test_common_failures_step():
      """
      Test that common failure cases of the `step` method are caught
      """
      env = IdentityEnvBox()
  
      # Wrong shape for the observation
      check_step_assert_error(env, (np.ones((4,)), 1.0, False, {}))
      # Obs is not a numpy array
      check_step_assert_error(env, (1, 1.0, False, {}))
  
      # Return a wrong reward
      check_step_assert_error(
          env, (env.observation_space.sample(), np.ones(1), False, {})
      )
  
      # Info dict is not returned
      check_step_assert_error(
          env, (env.observation_space.sample(), 0.0, False)
      )
  
      # Done is not a boolean
      check_step_assert_error(
          env, (env.observation_space.sample(), 0.0, 3.0, {})
      )
      check_step_assert_error(
          env, (env.observation_space.sample(), 0.0, 1, {})
      )
  
file_path: stable-baselines/tests/test_envs.py
imports: import pytest
  import gym
  from gym import spaces
  import numpy
  from stable_baselines.common.env_checker import check_env
  from stable_baselines.common.bit_flipping_env import BitFlippingEnv
  from stable_baselines.common.identity_env import IdentityEnv, IdentityEnvBox, IdentityEnvMultiBinary, IdentityEnvMultiDiscrete
label_desc: Use image node_id 8 for calling a global function with example usage: test_common_failures_step() without return types