'Allows settings children by index
:param key:
An integer of the child index
:param value:
An Asn1Value object to set the child to
:raises:
KeyError - when an index is invalid
ValueError - when the value is not an instance of Asn1Value'

def __setitem__(self, key, value):

    if ((key > (len(self._child_specs) - 1)) or (key < 0)):
        raise KeyError(unwrap(u'\n                                                                No    child    is    defined    for    position    %d    of    %s\n                                                                ', key, type_name(self)))
    if (not isinstance(value, Asn1Value)):
        raise ValueError(unwrap(u'\n                                                                Value    for    child    %s    of    %s    is    not    an    instance    of\n                                                                asn1crypto.core.Asn1Value\n                                                                ', key, type_name(self)))
    self._children[key] = value
