<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_env(workdir, logfile=None, loglevel=logging.INFO):
 """ Load an existing Lago environment Args: workdir(str):
 Path to the workdir directory, as created by :func:`~lago.sdk.init` or created by the CLI. logfile(str):
 A Path to setup a log file. loglevel(int):
 :mod:`logging` log level. Returns: :class:`~lago.sdk.SDK`: Initialized Lago environment Raises: :exc:`~lago.utils.LagoException`: If loading the environment failed. """


    setup_sdk_logging(logfile, loglevel)
    workdir = os.path.abspath(workdir)
    loaded_workdir = lago_workdir.Workdir(path=workdir)
    prefix = loaded_workdir.get_prefix('current')
    return SDK(loaded_workdir, prefix)