parseIndex = (index, values) => {
  if (Array.isArray(index)) {
    if (values.size !== index.length)
      throw new IndexMismatchError('values size not equal to index size');

    return Immutable.List(index);
  } else if (index instanceof Immutable.List) {
    if (values.size !== index.size)
      throw new IndexMismatchError('values size not equal to index size');

    return index;
  } else if (typeof index !== 'undefined') {
    if (values.size !== 1) throw new IndexMismatchError();

    return Immutable.List([index]);
  } else if (typeof index === 'undefined') {
    return Immutable.Range(0, values.size).toList();
  } else {
    throw new IndexMismatchError();
  }
}
@param {Array|List|string|number} index
   Values to update the index in the Series
@param {List} values
   The values in the Series

@returns {List}