'Get a dict value; create a MatlabStruct if requesting a submember.
Do not create a key if the attribute starts with an underscore.'

def __getitem__(self, attr):

    if ((attr in self.keys()) or attr.startswith('_')):
        return dict.__getitem__(self, attr)
    frame = inspect.currentframe()
    if (frame.f_back.f_back and self._is_allowed(frame.f_back.f_back)):
        dict.__setitem__(self, attr, MatlabStruct())
    elif self._is_allowed(frame.f_back):
        dict.__setitem__(self, attr, MatlabStruct())
    return dict.__getitem__(self, attr)
