def METHOD_NAME(self):
    """Toggle X-ray mode on and off. This is useful for seeing the
    effectiveness of the occluder culling."""
    self.xray_mode = not self.xray_mode
    if self.xray_mode:
        self.level_model.setColorScale((1, 1, 1, 0.5))
        self.level_model.setTransparency(TransparencyAttrib.MDual)
    else:
        self.level_model.setColorScaleOff()
        self.level_model.setTransparency(TransparencyAttrib.MNone)