def METHOD_NAME(config, agent, eval_env_config, task: str, world_type: str):
    eval_env_config = eval_env_config.copy()
    eval_env_config['world_type'] = world_type
    env = create_env(eval_env_config,
                     task=task,
                     node_handle=eval_env_config["node_handle"],
                     flatten_obs=True)
    rospy.loginfo(f"Evaluating on task {env.taskname()} with {world_type} execution.")
    prefix = ''
    if world_type != 'sim':
        prefix += f'ts{config["time_step"]}_slow{config["slow_down_real_exec"]}'
    agent.eval(env, nr_evaluations=config["nr_evaluations"], name_prefix=prefix)
    env.clear()