code: def test_observation_space():
      observation_space = ObservationSpace(np.array([1, 10]), -10, 10)
  
      # testing that contains works
      assert observation_space.contains(np.ones([1, 10]))
      assert not observation_space.contains(np.ones([2, 10]))
      assert not observation_space.contains(np.ones([1, 10]) * 100)
      assert not observation_space.contains(np.ones([1, 1, 10]))
  
      # is_valid_index
      assert observation_space.is_valid_index(np.array([0, 9]))
      assert observation_space.is_valid_index(np.array([0, 0]))
      assert not observation_space.is_valid_index(np.array([1, 8]))
      assert not observation_space.is_valid_index(np.array([0, 10]))
      assert not observation_space.is_valid_index(np.array([-1, 6]))
  
file_path: coach/rl_coach/tests/test_spaces.py
imports: import os
  import sys
  import pytest
  from rl_coach.spaces import DiscreteActionSpace, BoxActionSpace, MultiSelectActionSpace, ObservationSpace, AgentSelection, VectorObservationSpace, AttentionActionSpace
  import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: test_observation_space() without return types