code: def test_get_inf():
      """Tests that get inf function works as expected, primarily for coverage."""
      assert get_inf(np.float32, "+") == np.inf
      assert get_inf(np.float16, "-") == -np.inf
      with pytest.raises(
          TypeError,
          match=re.escape("Unknown sign *, use either '+' or '-'"),
      ):
          get_inf(np.float32, "*")
  
      assert get_inf(np.int16, "+") == 32765
      assert get_inf(np.int8, "-") == -126
      with pytest.raises(
          TypeError,
          match=re.escape("Unknown sign *, use either '+' or '-'"),
      ):
          get_inf(np.int32, "*")
  
      with pytest.raises(
          ValueError,
          match=re.escape(
              "Unknown dtype <class 'numpy.complex128'> for infinite bounds"
          ),
      ):
          get_inf(np.complex_, "+")
  
file_path: gym/tests/spaces/test_box.py
imports: import re
  import warnings
  import numpy
  import pytest
  import gym.error
  from gym.spaces import Box
  from gym.spaces.box import get_inf
label_desc: Use image node_id 7 for calling a global function with example usage: test_get_inf() without return types