def dfs_stk(self, A, k, cur, remain, ret):
        if len(cur) == k and remain == 0:
            ret.append(list(cur))

        if not A or len(cur) >= k or len(A)+len(cur) < k:
            return

        # save space
        num = A.pop()

        self.dfs(A, k, cur, remain, ret)
        cur.append(num)
        self.dfs(A, k, cur, remain-num, ret)
        cur.pop()

        A.append(num)
If *d* (a dictionary) has *attempt_id* but not *task_id*, add it.
dataset/ETHPy150Open algorhythms/LintCode/k Sum II.py/Solution.dfs_stk--crossover with--dataset/ETHPy150Open Yelp/mrjob/mrjob/logs/ids.py/_add_implied_task_id