This method occurs after dumping the data into the class.

        Args:
            data (dict): dictionary of all the query values

        Returns:
            data (dict): ordered dict of all the values
336062
def build_url(self, data):
        
        query_part_one = []
        query_part_two = []
        keys_to_be_removed = []
        for key, value in data.items():
            if key not in ['version', 'restApi', 'resourcePath']:
                if key == 'mapArea':
                    query_part_one.append(','.join(str(val) for val in value))
                    keys_to_be_removed.append(key)
                elif key == 'includeLocationCodes':
                    query_part_one.append(value)
                    keys_to_be_removed.append(key)
                else:
                    if isinstance(value, list):
                        value = ','.join(str(val) for val in value)
                    query_part_two.append('{0}={1}'.format(key, value))
                    keys_to_be_removed.append(key)
        for k in keys_to_be_removed:
            del data[k]
        data['query'] = '{0}?{1}'.format('/'.join(query_part_one),
                                         '&'.join(query_part_two))
        return data
1170884
def set_data(self, data):
        
        for name in self._fields:
            setattr(self, name, data.get(name))
        return self
305514
def format_response(self, data):
        
        self.count = self.max_count

        return OrderedDict([
            ('highest_count', self.max_count),
            ('overall_total', self.total),
            ('next', self.get_next_link()),
            ('previous', self.get_previous_link()),
            ('results', data)
        ])
513259
def _create_raw_data(self):
        
        result = {}
        for section in self.get_sections():
            result[section.get('id')] = 'all'
        return result
1168476
def _loadData(self, data):
        
        self._data = data
        self.codec = data.attrib.get('codec')
        self.codecID = data.attrib.get('codecID')
        self.id = cast(int, data.attrib.get('id'))
        self.index = cast(int, data.attrib.get('index', '-1'))
        self.language = data.attrib.get('language')
        self.languageCode = data.attrib.get('languageCode')
        self.selected = cast(bool, data.attrib.get('selected', '0'))
        self.streamType = cast(int, data.attrib.get('streamType'))
        self.type = cast(int, data.attrib.get('streamType'))
727031
def __respond_with_dict(self, data):
        
        response = {}
        if isinstance(data, list):
            temp_data, data = data, {}
            for key, value in enumerate(temp_data):
                data[key] = value

        data.pop('seq', None)
        for index, item in data.items():
            values = item
            if isinstance(item, list) or isinstance(item, dict):
                values = self.__respond_with_dict(item)

            if isinstance(values, dict) and len(values) == 1:
                (key, values), = values.items()
            response[index] = values

        return response
368843
def data(self):
        
        d = {}
        for key in self._data:
            if key == "plugins":
                d[key] = self.plugins.data()
            else:
                try:
                    d[key] = getattr(self, key)
                except AttributeError:
                    pass  # unknown key, just leave it unchanged
        return d
616710
def from_dict(cls, data, model):
        
        model_provided = model is not None
        result = {}
        for name, new_value in data.items():
            kwargs = {
                'name': name,
                'new_value': new_value,
            }
            if model_provided:
                kwargs['params'] = model.get_field_params(name)
            result[name] = cls(**kwargs)
        return result
498813
def from_dict(data):
        
        data = deepcopy(data)

        created_at = data.get('created_at', None)
        if created_at is not None:
            data['created_at'] = dateutil.parser.parse(created_at)

        return Image(**data)
1008365
def return_data(self, data, format=None):
        
        if format is None:
            format = self.format
        if format == "json":
            formatted_data = json.loads(data)
        else:
            formatted_data = data
        return formatted_data
567208
def data(self):
        
        d = {}
        for name in self.key_names:
            d[name] = self.__dict__.get(name, None)
        return d
31057
def dump(cls):
        
        d = OrderedDict(cls.Items())
        d["__classname__"] = cls.__name__
        for attr, klass in cls.Subclasses():
            d[attr] = klass.dump()
        return OrderedDict([(cls.__name__, d)])
643954
def serialize(self, data):
        
        if data is None:
            return None
        elif isinstance(data, dict):
            return serializer.Serializer().serialize(data)
        else:
            raise Exception(_("Unable to serialize object of type = '%s'") %
                            type(data))
1009878
def deserialize(self, data):
        
        if not data:
            return dict()
        return self._deserialize_datetime(pickle.loads(data))
819971
def json_dumps(self, data):
        
        return json.dumps(
            data, 
            separators=(',', ':'), 
            sort_keys=True, 
            cls=self.json_encoder, 
            ensure_ascii=False
        ).encode('utf8')
414912
def list_data(self):
        
        fn = (lambda v: json.loads(decode(v))) if self._use_json else decode
        return map(fn, self._data.values())
240890
def update(self, data):
        
        result = None
        if data:
            _dumps = self._dumps
            data = {
                key: _dumps(value)
                for key, value in data.items()}
            result = self._client.hmset(self.key_prefix, data)
        return result