<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def close(self):
 """Closes connection pair"""


        if self.connected:
            obj = [self.proto.max_id, [[2], self.proto.send_count]]
            ARBITRATOR.send_sync_message(self.proto, f"4{to_json(obj)}")
            self.proto.send_count += 1
            ARBITRATOR.close(self.proto)
        self.listeners.clear()
        self.proto.connected = False
        super().close()
        del self.room
        del self.proto