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