<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def end_script(self):
 """Indicate that we have finished receiving a script."""


        if self.remote_bridge.status not in (BRIDGE_STATUS.RECEIVED, BRIDGE_STATUS.WAITING):
            return [1] #FIXME: State change

        self.remote_bridge.status = BRIDGE_STATUS.RECEIVED
        return [0]