def _TokenizeQuotedList(arg_value):
  """Tokenize an argument into a list.

  Args:
    arg_value: str, The raw argument.

  Returns:
    [str], The tokenized list.

  Raises:
    ArgumentTypeError: If the list is malformed.
  """
  if arg_value:
    if not arg_value.endswith(','):
      arg_value += ','
    return arg_value.split(',')[:-1]
  return []