def make_env(env_config, mode=None):
    """
    Makes an environment and populates related fields in env_config
    return env, env_config
    Args:
        mode(str): allow differnt kwargs to the initializer of the environment
    """
    env_name = env_config.env_name
    env_category, env_name = env_name.split(':')
    if mode == 'eval' and 'eval_mode' in env_config:
        for k, v in env_config.eval_mode.items():
            env_config[k] = v
    if env_category == 'gym':
        env, env_config = make_gym(env_name, env_config)
    elif env_category == 'robosuite':
        env, env_config = make_robosuite(env_name, env_config)
    elif env_category == 'dm_control':
        env, env_config = make_dm_control(env_name, env_config)
    else:
        raise ValueError('Unknown environment category: {}'.format(env_category))
    return env, env_config

    Makes an environment and populates related fields in env_config
    return env, env_config
    Args:
        mode(str): allow differnt kwargs to the initializer of the environment
    
surreal/env/make_env.py