def getitem(self, index, context=None):
for key, value in self.items:<EOL><INDENT>if isinstance(key, DictUnpack):<EOL><INDENT>try:<EOL><INDENT>return value.getitem(index, context)<EOL><DEDENT>except (exceptions.AstroidTypeError, exceptions.AstroidIndexError):<EOL><INDENT>continue<EOL><DEDENT><DEDENT>for inferredkey in key.infer(context):<EOL><INDENT>if inferredkey is util.Uninferable:<EOL><INDENT>continue<EOL><DEDENT>if isinstance(inferredkey, Const) and isinstance(index, Const):<EOL><INDENT>if inferredkey.value == index.value:<EOL><INDENT>return value<EOL><DEDENT><DEDENT><DEDENT><DEDENT>raise exceptions.AstroidIndexError(index)<EOL>
Get an item from this node.

        :param index: The node to use as a subscript index.
        :type index: Const or Slice

        :raises AstroidTypeError: When the given index cannot be used as a
            subscript index, or if this node is not subscriptable.
        :raises AstroidIndexError: If the given index does not exist in the
            dictionary.