Not able to run custom env code

Ray verison : 2.2.0
python version: 3.10.0

Running the SimpleCorridor custom env code provided here : ray/rllib/examples/ at master · ray-project/ray · GitHub

Getting this error

ValueError: Env must be of one of the following supported types: BaseEnv, gym.Env, MultiAgentEnv, VectorEnv, RemoteBaseEnv, ExternalMultiAgentEnv, ExternalEnv, but instead is of type <class '__main__.SimpleCorridor'>.

The above error has been found in your environment! We've added a module for checking your custom environments. It may cause your experiment to fail if your environment is not set up correctly. You can disable this behavior by setting `disable_env_checking=True` in your environment config dictionary. You can run the environment checking module standalone by calling ray.rllib.utils.check_env([env]).