code: def reopen(self, file_obj):
          
          file_obj.open('U')
          if sys.version_info[0] <= 2:
              return file_obj
          else:
              return codecs.getreader('utf-8')(file_obj)
docs: Reopen the file-like object in a safe manner.