# HACK ALERT: This is a temporary solution for running Python models on Koldstart.
# Environments in dbt-fal work with `isolate` abstractions and so far these
# have been re-used to get us here. But `koldstart` API uses different
# abstractions. So this where we tranform `isolate` objects into `koldstart`
# objects and run the resulting isolated function.
# One big change in `koldstart` is that it supports only one target environment
# whereas isolate lets you stack environments on top of each other. We resolve this
# in two ways, for `virtualenv` environments we just merge base requirements (dbt-*)
# with user requirements, whereas for `conda` environments we create an `env_dict`,
# where we add base requirements as `pip` requirements.