<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_env(name, env_creator):
 """Register a custom environment for use with RLlib. Args: name (str):
 Name to register. env_creator (obj):
 Function that creates an env. """


    if not isinstance(env_creator, FunctionType):
        raise TypeError("Second argument must be a function.", env_creator)
    _global_registry.register(ENV_CREATOR, name, env_creator)