HF RL Explorer

Slightly improve performance in engines/utils.py

Slightly improve performance in engines/utils.py: a task in life-science-SWE1.0 (Harbor dataset). Title: Slightly improve performance in engines/utils.py

The task

**Title:** Slightly improve performance in engines/utils.py

Part of scalingX/life-science-SWE1.0.