def parse_colon_delimited_options(option_args):
  """Parses a key value from a string.

  Args:
      option_args: Key value string delimited by a color, ex: ("key:value")

  Returns:
      Return an array with the key as the first element and value as the second

  Raises:
      ValueError: If the key value option is not formatted correctly
  """
  options = {}

  if not option_args:
    return options

  for single_arg in option_args:
    values = single_arg.split(':')
    if len(values) != 2:
      raise ValueError('An option arg must be a single key/value pair '
                       'delimited by a colon - ex: "thing_key:thing_value"')

    key = values[0].strip()
    value = values[1].strip()
    options[key] = value

  return options