def to_internal_value(self, data):
        """
        Range instances <- Dicts of primitive datatypes.
        """
        if html.is_html_input(data):
            data = html.parse_html_dict(data)
        if not isinstance(data, dict):
            self.fail('not_a_dict', input_type=type(data).__name__)
        validated_dict = {}
        for key in ('lower', 'upper'):
            try:
                value = data.pop(key)
            except __HOLE__:
                continue
            validated_dict[six.text_type(key)] = self.child.run_validation(value)
        for key in ('bounds', 'empty'):
            try:
                value = data.pop(key)
            except KeyError:
                continue
            validated_dict[six.text_type(key)] = value
        if data:
            self.fail('too_much_content', extra=', '.join(map(str, data.keys())))
        return self.range_type(**validated_dict)
dataset/ETHPy150Open Hipo/drf-extra-fields/drf_extra_fields/fields.py/RangeField.to_internal_value