code: def test_dtype_check():
      """Tests the Box contains function with different dtypes."""
      # Related Issues:
      # https://github.com/openai/gym/issues/2357
      # https://github.com/openai/gym/issues/2298
  
      space = Box(0, 1, (), dtype=np.float32)
  
      # casting will match the correct type
      assert np.array(0.5, dtype=np.float32) in space
  
      # float16 is in float32 space
      assert np.array(0.5, dtype=np.float16) in space
  
      # float64 is not in float32 space
      assert np.array(0.5, dtype=np.float64) not in space
  
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 4 for calling a global function with example usage: test_dtype_check() without return types