[Frozen Code Start]
    obs, reward, done = pick(
                    env,
                    task,
                    target_pos=np.array(tomato_pos)
obs, reward, done = place(
                    env,
                    task,
                    target_pos=np.array(plate_pos)
[Frozen Code End]

        except Exception as e:
            print(f"[Task] Exception during place of {tomato}: {e}")
            return

        if done:
            print(f"[Task] Task ended during place of {tomato}.")
            return

    # === Task Completion ===
    print("[Task] Completed transferring all tomatoes. Final reward:", reward)

finally:
    # Always ensure the environment is properly shutdown
    shutdown_environment(env)

print("===== End of Skeleton Task =====")


if __name__ == "__main__":
    run_skeleton_task()