<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def toggle_object_status(self, objname):
 """ Toggle boolean-valued sensor status between ``True`` and ``False``. """

        o = getattr(self.system, objname)
        o.status = not o.status
        self.system.flush()
        return o.status