code: def push(stack, x, op_id):
    
    if isinstance(x, numpy.ndarray):
      x = x.copy()
    elif isinstance(x, list):
      x = x[:]
    if __debug__:
      stack.append((x, op_id))
    else:
      stack.append(x)
docs: Push a value onto the stack (i.e. record it on the tape).
  
    Args:
      stack: The stack object, which must support appending values.
      x: The value to append. If it is a mutable object like an array or list, it
          will be copied before being added onto the stack.
      op_id: A unique variable that is also passed into the corresponding pop.
          Allows optimization passes to track pairs of pushes and pops.