code: def _3(self):
          
          boundary = self.boundary
          buf = BytesIO()
          textwriter = io.TextIOWrapper(
              buf, 'utf8', newline='', write_through=True)
  
          for (key, value) in self.form_fields:
              textwriter.write(
                  '--{boundary}\r\n'
                  'Content-Disposition: form-data; name="{key}"\r\n\r\n'
                  '{value}\r\n'.format(
                      boundary=boundary, key=key, value=value))
          for(key, filename, mimetype, filepath) in self.files:
              if os.path.isfile(filepath):
                  textwriter.write(
                      '--{boundary}\r\n'
                      'Content-Disposition: form-data; name="{key}"; '
                      'filename="{filename}"\r\n'
                      'Content-Type: {content_type}\r\n\r\n'.format(
                          boundary=boundary, key=key, filename=filename,
                          content_type=mimetype))
                  with open(filepath, "rb") as f:
                      shutil.copyfileobj(f, buf)
                  textwriter.write('\r\n')
          textwriter.write('--{}--\r\n\r\n'.format(boundary))
          self.form_data = buf.getvalue()
docs: python 3 method