code: def test_dict_init():
      with pytest.raises(
          AssertionError,
          match=r"^Unexpected Dict space input, expecting dict, OrderedDict or Sequence, actual type: ",
      ):
          Dict(Discrete(2))
  
      with pytest.raises(
          ValueError,
          match="Dict space keyword 'a' already exists in the spaces dictionary",
      ):
          Dict({"a": Discrete(3)}, a=Box(0, 1))
  
      with pytest.raises(
          AssertionError,
          match="Dict space element is not an instance of Space: key='b', space=Box",
      ):
          Dict(a=Discrete(2), b="Box")
  
      with pytest.warns(None) as warnings:
          a = Dict({"a": Discrete(2), "b": Box(low=0.0, high=1.0)})
          b = Dict(OrderedDict(a=Discrete(2), b=Box(low=0.0, high=1.0)))
          c = Dict((("a", Discrete(2)), ("b", Box(low=0.0, high=1.0))))
          d = Dict(a=Discrete(2), b=Box(low=0.0, high=1.0))
  
          assert a == b == c == d
      assert len(warnings) == 0
  
      with pytest.warns(None) as warnings:
          Dict({1: Discrete(2), "a": Discrete(3)})
      assert len(warnings) == 0
  
file_path: gym/tests/spaces/test_dict.py
imports: from collections import OrderedDict
  import numpy
  import pytest
  from gym.spaces import Box, Dict, Discrete
label_desc: Use image node_id 1 for calling a global function with example usage: test_dict_init() without return types