def get_arg(cmds):
  """Accepts a split string command and validates its size.

  Args:
    cmds: A split command line as a list of strings.

  Returns:
    The string argument to the command.

  Raises:
    ValueError: If there is no argument.
  """
  if len(cmds) != 2:
    raise ValueError('%s needs an argument.' % cmds[0])
  return cmds[1]