input: Write a function to demonstrate stack operations including push, pop, peek, and check if the stack is empty.
  assert stack_operations(["push 10", "push 20", "pop", "peek", "isEmpty", "size"]) == (20, 10, False, 1)
  assert stack_operations(["push 5", "push 15", "push 25", "pop", "isEmpty", "size"]) == (25, 15, False, 2)
  assert stack_operations(["push 2", "pop", "isEmpty", "size"]) == (2, None, True, 0)
output: def stack_operations(operations):
      stack = []
  
      def push(value):
          stack.append(value)
  
      def pop():
          return stack.pop() if stack else None
  
      def peek():
          return stack[-1] if stack else None
  
      def isEmpty():
          return len(stack) == 0
  
      def size():
          return len(stack)
  
      results = []
      for operation in operations:
          if operation.startswith("push"):
              _, value = operation.split()
              push(int(value))
          elif operation == "pop":
              results.append(pop())
          elif operation == "peek":
              results.append(peek())
          elif operation == "isEmpty":
              results.append(isEmpty())
          elif operation == "size":
              results.append(size())
  
      # Return results according to the expected order
      if len(results) == 4:
          return tuple(results)
      elif len(results) == 3:
          return (results[0], None, results[1], results[2])
  
  # Example usage:
  # assert stack_operations(["push 10", "push 20", "pop", "peek", "isEmpty", "size"]) == (20, 10, False, 1)
  # assert stack_operations(["push 5", "push 15", "push 25", "pop", "isEmpty", "size"]) == (25, 15, False, 2)
  # assert stack_operations(["push 2", "pop", "isEmpty", "size"]) == (2, None, True, 0)