def _getMapProperty(self):
        prop = self
        def fget(self):
            return getattr(self, prop.name%'_%sMap', None)
        def fset(self, val):
            if prop.propertyLink is not None:
                linkName, linkMap = prop.propertyLink
                assert getattr(self, '%sMap'%linkName, None) is None, 'Cannot set both sides of a linked property.'
            # TODO: Check if the mapping can be correct
            setattr(self, '_%sMap'%prop.name, val)
        return property(fget=fget, fset=fset, doc=prop.doc)
dataset/ETHPy150Open simpeg/simpeg/SimPEG/PropMaps.py/Property._getMapProperty/swapped operands of `%`