Description:

            Returns dict of information about the TV
            name, model, version
10042
def info(self):
        
        return {"name": self._send_command('name'),
                "model": self._send_command('model'),
                "version": self._send_command('version'),
                "ip_version": self._send_command('ip_version')
               }
1047752
def get_device_model(self, cat, sub_cat, key=''):
        """"""
        if cat + ':' + sub_cat in self.device_models:
            return self.device_models[cat + ':' + sub_cat]
        else:
            for i_key, i_val in self.device_models.items():
                if 'key' in i_val:
                    if i_val['key'] == key:
                        return i_val
            return False
626270
def get_channel_info(self):
        
        self.assert_open()
        channel_info = self.handle[self.global_key + 'channel_id'].attrs.items()
        channel_info = {key: _clean(value) for key, value in channel_info}
        channel_info['channel_number'] = int(channel_info['channel_number'])
        return channel_info
1329162
def metainfo_to_dict(self) -> dict:
        ''''''

        r = {
            "version": self.version,
            "amount": self.amount,
            "number_of_decimals": self.number_of_decimals
        }

        if self.asset_specific_data:
            r.update({'asset_specific_data': self.asset_specific_data})

        return r
410647
def _info(self):
        """"""
        d = OrderedDict()

        d['vid'] = self.vid
        d['sname'] = self.sname
        d['vname'] = self.vname

        return d
1260681
def get_device_names_to_objects(devices):
    '''
    '''

    name_to_object = {}
    for device in devices:
        device_name = get_device_info(device).name
        name_to_object[device_name] = device
    return name_to_object
128021
def get_display_name_metadata(self):
        """"""
        metadata = dict(self.my_osid_object_form._mdata['display_name'])
        metadata.update({'read_only': True})
        return Metadata(**metadata)
250454
def get_info(self) -> dict:
        """"""
        with suppress_stdout():
            with youtube_dl.YoutubeDL() as ydl:
                info_dict = ydl.extract_info(self.url, download=False)
                return info_dict
718179
def names_dict(self):
        """"""
        INCLUDE_KEYS = ['name', 'vname', 'vid']

        d = {k: v for k, v in iteritems(self.dict) if k in INCLUDE_KEYS}

        d['fqname'] = self.fqname

        return d
1105414
def to_dict(self):
        

        result = self.to_identifier()

        result['seasons'] = [
            season.to_dict()
            for season in self.seasons.values()
        ]

        result['in_watchlist'] = self.in_watchlist if self.in_watchlist is not None else 0

        if self.rating:
            result['rating'] = self.rating.value
            result['rated_at'] = to_iso8601_datetime(self.rating.timestamp)

        # Extended Info
        if self.first_aired:
            result['first_aired'] = to_iso8601_datetime(self.first_aired)

        if self.updated_at:
            result['updated_at'] = to_iso8601_datetime(self.updated_at)

        if self.overview:
            result['overview'] = self.overview

        if self.airs:
            result['airs'] = self.airs

        if self.runtime:
            result['runtime'] = self.runtime

        if self.certification:
            result['certification'] = self.certification

        if self.network:
            result['network'] = self.network

        if self.country:
            result['country'] = self.country

        if self.status:
            result['status'] = self.status

        if self.homepage:
            result['homepage'] = self.homepage

        if self.language:
            result['language'] = self.language

        if self.available_translations:
            result['available_translations'] = self.available_translations

        if self.genres:
            result['genres'] = self.genres

        if self.aired_episodes:
            result['aired_episodes'] = self.aired_episodes

        return result
1018713
def to_dict(self):
        
        data = {
            'name': self.name,
            'video_id': self.video_id,
            'time': self.time,
            'forceStop': self.force_stop,
            'type': self.type,
            'metadata': self.metadata}
        for key in data.keys():
            if data[key] == None:
                data.pop(key)
        return data
1015132
def _parse_device_information(device_info_string) -> dict:
    '''
    
    '''
    error_msg = 'Unexpected argument to _parse_device_information: {}'.format(
        device_info_string)
    if not device_info_string or \
            not isinstance(device_info_string, str):
        raise ParseError(error_msg)
    parsed_values = device_info_string.strip().split(' ')
    if len(parsed_values) < 3:
        log.error(error_msg)
        raise ParseError(error_msg)
    res = {
        _parse_key_from_substring(s): _parse_string_value_from_substring(s)
        for s in parsed_values[:3]
    }
    for key in ['model', 'version', 'serial']:
        if key not in res:
            raise ParseError(error_msg)
    return res
403787
def to_simple_dict(self):
        """"""
        return {
            'version': self.version,
            'product': self.product,
            'channel': self.channel,
            'is_public': self.is_public,
            'slug': self.slug,
            'title': unicode(self),
        }
974275
def get(self):
        
        keys = ["enable", "utm_source", "utm_medium", "utm_term",
                "utm_content", "utm_campaign"]

        ganalytics = {}

        for key in keys:
            value = getattr(self, key, None)
            if value is not None:
                if isinstance(value, bool):
                    ganalytics[key] = value
                else:
                    ganalytics[key] = value.get()

        return ganalytics
181462
def info(self, channel_id):
        
        resource = 'v1/channel.info?channel_id={}'.format(channel_id)
        resp = self._rtm_client.get(resource)
        if resp.is_fail():
            raise RTMServiceError("Failed to get channel information", resp)

        return resp.data['result']
353763
def get_dict(self):
        """"""
        data = self.data_dict.copy()

        data.update({
            "class": self.classification,
            "tags": self.tags,
            "key_value_data": self.key_value_dict,
            "crumbs": self.crumb_list if len(self.crumb_list) > 0 else None,
            "media": [
                mediafile.filename
                if mediafile.filename is not None
                else mediafile.uri
                for mediafile in self.media_list
            ] if len(self.media_list) > 0 else None,
            "uri": self.uri,
            "dumped": datetime.utcnow().isoformat(),
        })

        return data
1202492
def info(self):
        
        return {
            "name": self.name,
            "size": self.size,
            "extension": self.extension,
            "url": self.url,
            "full_url": self.full_url,
            "type": self.type,
            "path": self.path,
            "provider_name": self.provider_name
        }