code: def to_python(self, data):
          
          if data is None:
              return ''
          if isinstance(data, self.datatype):
              return data
          if self.datatype is unicode:
              return unicode(data, DEFAULT_ENCODING)
          else:
              return data.encode(DEFAULT_ENCODING)
docs: Convert a data to python format.