def _get_upstream_invocations(self, context: "RunContext"):
        """
        NB. this memoization assumes the context (and contained env vars) will be the
        same in all instances for the lifetime of this object. Whilst this should be OK
        for all current use cases is it strictly speaking something that this object
        should not know enough to safely assume. So we probably want to revisit this.
        """
        import shlex

        options = self.spec.options

        if self.__upstream_invocations is None:
            env = self.spec.get_task_env(context.env)
            env.update(self.get_parsed_arguments(env)[0])

            self.__upstream_invocations = {
                "deps": [
                    tuple(shlex.split(env.fill_template(task_ref)))
                    for task_ref in options.get("deps", tuple())
                ],
                "uses": {
                    key: tuple(shlex.split(env.fill_template(task_ref)))
                    for key, task_ref in options.get("uses", {}).items()
                },
            }

        return self.__upstream_invocations

        NB. this memoization assumes the context (and contained env vars) will be the
        same in all instances for the lifetime of this object. Whilst this should be OK
        for all current use cases is it strictly speaking something that this object
        should not know enough to safely assume. So we probably want to revisit this.
        
poethepoet/task/base.py