code: def pop_arguments(instr, stack):
      
      needed = instr.stack_effect
      if needed >= 0:
          raise DecompilationError(
              "%s is does not have a negative stack effect" % instr
          )
  
      for popcount, to_pop in enumerate(reversed(stack), start=1):
          needed += to_pop.stack_effect
          if not needed:
              break
      else:
          raise DecompilationError(
              "Reached end of stack without finding inputs to %s" % instr,
          )
  
      popped = stack[-popcount:]
      stack[:] = stack[:-popcount]
  
      return popped
docs: Pop instructions off `stack` until we pop all instructions that will
      produce values popped by `instr`.