def new_cast_status(self, cast_status):
        """ Called when a new cast status has been received. """
        new_channel = self.destination_id != cast_status.transport_id

        if new_channel:
            self._disconnect_channel(self.destination_id)

        self.app_namespaces = cast_status.namespaces
        self.destination_id = cast_status.transport_id
        self.session_id = cast_status.session_id

        if new_channel:
            # If any of the namespaces of the new app are supported
            # we will automatically connect to it to receive updates
            for namespace in self.app_namespaces:
                if self._handlers in namespace:
                    self._ensure_channel_connected(self.destination_id)
                    self._handlers[namespace].channel_connected()
dataset/ETHPy150Open balloob/pychromecast/pychromecast/socket_client.py/SocketClient.new_cast_status/swapped operands of `in`