def clean(self, data):
try:<EOL><INDENT>value = data[self.column_name]<EOL><DEDENT>except KeyError:<EOL><INDENT>raise KeyError("<STR_LIT>"<EOL>"<STR_LIT>" % (self.column_name, list(data)))<EOL><DEDENT>value = self.widget.clean(value, row=data)<EOL>if value in self.empty_values and self.default != NOT_PROVIDED:<EOL><INDENT>if callable(self.default):<EOL><INDENT>return self.default()<EOL><DEDENT>return self.default<EOL><DEDENT>return value<EOL>
Translates the value stored in the imported datasource to an
appropriate Python object and returns it.