Migrate some type annotation tweaks from 4100
Migrate some type annotation tweaks from 4100: a task in life-science-SWE1.0 (Harbor dataset). Title: Migrate some type annotation tweaks from 4100
The task
**Title:** Migrate some type annotation tweaks from #4100
Part of scalingX/life-science-SWE1.0.