'Mimics defaultdict. This is called from __getitem__ when key DNE.'

def __missing__(self, key):

    if (key in self._get_valid_attributes()):
        if (self._get_attribute_role(key) == 'object'):
            value = GraphObjectFactory.create(key, _parent=self, _parent_key=key)
            return super(PlotlyDict, self).__setitem__(key, value)
    subplot_key = self._get_subplot_key(key)
    if (subplot_key is not None):
        value = GraphObjectFactory.create(subplot_key, _parent=self, _parent_key=key)
        super(PlotlyDict, self).__setitem__(key, value)
