'Decode element to unicode if necessary.'

def _decode_element(self, line):

    if (isinstance(line, six.binary_type) and self.default_encoding):
        return line.decode(self.default_encoding)
    else:
        return line
