'Override to enforce validation.'

def __setitem__(self, index, value, _raise=True):

    if (not isinstance(index, int)):
        if _raise:
            index_type = type(index)
            raise TypeError('Index    must    be    int,    not    {}'.format(index_type))
        return
    if (index >= len(self)):
        raise IndexError(index)
    value = self._value_to_graph_object(index, value, _raise=_raise)
    if isinstance(value, (PlotlyDict, PlotlyList)):
        super(PlotlyList, self).__setitem__(index, value)
