def _drop(x):  # pylint: disable=invalid-name
  """Helper: pop top element of a stack (make it a non-list if length is 1)."""
  result = x[1:]
  if len(result) == 1:
    return result[0]
  return result