def get_task_env(
            self,
            parent_env: "EnvVarsManager",
            uses_values: Optional[Mapping[str, str]] = None,
        ) -> "EnvVarsManager":
            """
            Resolve the EnvVarsManager for this task, relative to the given parent_env
            """
            task_envfile = self.options.get("envfile")
            task_env = self.options.get("env")

            result = parent_env.clone()

            # Include env vars from outputs of upstream dependencies
            if uses_values:
                result.update(uses_values)

            result.set("POE_CONF_DIR", str(self.source.config_dir))
            result.apply_env_config(
                task_envfile,
                task_env,
                config_dir=self.source.config_dir,
                config_working_dir=self.source.cwd,
            )

            return result

            Resolve the EnvVarsManager for this task, relative to the given parent_env
            
poethepoet/task/base.py