code: def from_spec(spec, kwargs):
          
          env = tensorforce.util.get_object(
              obj=spec,
              predefined_objects=tensorforce.environments.environments,
              kwargs=kwargs
          )
          assert isinstance(env, Environment)
          return env
docs: Creates an environment from a specification dict.