code: def second_switch_pairs(stack):
      q = collections.deque()
      # Put all values into queue from stack
      for i in range(len(stack)):
          q.append(stack.pop())
      # Put values back into stack from queue
      for i in range(len(q)):
          stack.append(q.pop())
      # Now, stack is reverse, put all values into queue from stack
      for i in range(len(stack)):
          q.append(stack.pop())
      # Swap pairs by appending the 2nd value before appending 1st value
      for i in range(len(q)):
          if len(q) == 0:
              break
          first = q.pop()
          if len(q) == 0:  # case: odd number of values in stack
              stack.append(first)
              break
          second = q.pop()
          stack.append(second)
          stack.append(first)
  
      return stack
  
label_desc: Use image node_id 2 for calling a global function with example usage: second_switch_pairs(stack) and returns: stack