Implement the stack operations in any programming language.
Implement stack_operations(operations), where operations is a list of command lists. Supported commands are push with one value, pop, peek, size, and is_empty. Return a list containing the result of every operation except push. For an empty pop or peek, return None.
Example: [["push", 4], ["peek"], ["pop"]] returns [4, 4]. [["pop"], ["is_empty"]] returns [None, True].
def stack_operations(operations):