def set_environ(env_holder: dict, overwrite: bool):
    """Return lambda to set environ.

    Use setdefault unless overwrite is specified.
    """
    if overwrite:
        return lambda k, v: env_holder.update({k: str(v)})
    return lambda k, v: env_holder.setdefault(k, str(v))