@staticmethod
    def _parse_status(data, cast_type):
        """
        Parses a STATUS message and returns a CastStatus object.

        :type data: dict
        :param cast_type: Type of Chromecast.
        :rtype: CastStatus
        """
        data = data.get('status', {})

        volume_data = data.get('volume', {})

        try:
            app_data = data['applications'][0]
        except KeyError:
            app_data = {}

        is_audio = (CAST_TYPE_AUDIO, CAST_TYPE_GROUP) in cast_type

        status = CastStatus(
            data.get('isActiveInput', None if is_audio else False),
            data.get('isStandBy', None if is_audio else True),
            volume_data.get('level', 1.0),
            volume_data.get('muted', False),
            app_data.get(APP_ID),
            app_data.get('displayName'),
            [item['name'] for item in app_data.get('namespaces', [])],
            app_data.get(SESSION_ID),
            app_data.get('transportId'),
            app_data.get('statusText', '')
            )
        return status
dataset/ETHPy150Open balloob/pychromecast/pychromecast/socket_client.py/ReceiverController._parse_status/swapped operands of `in`