code: def test_discrete():
      action_space = DiscreteActionSpace(3, ["zero", "one", "two"])
      assert action_space.shape == 1
      for i in range(100):
          assert 3 > action_space.sample() >= 0
      action_info = action_space.sample_with_info()
      assert action_info.all_action_probabilities[0] == 1.0 / 3
      assert action_space.high == 2
      assert action_space.low == 0
  
      # list descriptions
      assert action_space.get_description(1) == "one"
  
      # dict descriptions
      action_space = DiscreteActionSpace(
          3, {1: "one", 2: "two", 0: "zero"}
      )
      assert action_space.get_description(0) == "zero"
  
      # no descriptions
      action_space = DiscreteActionSpace(3)
      assert action_space.get_description(0) == "0"
  
      # descriptions for invalid action
      with pytest.raises(ValueError):
          assert action_space.get_description(3) == "0"
  
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 1 for calling a global function with example usage: test_discrete() without return types