def __getitem__(self, name):
        """Dictionary-style field access, return a field's value if present.
        """
        try:
            if name in self._fields_ordered:
                return getattr(self, name)
        except AttributeError:
            pass
        raise KeyError(name)
dataset/ETHPy150Open MongoEngine/mongoengine/mongoengine/base/document.py/BaseDocument.__getitem__/original