code: def encode_multipart_formdata(fields, files):
      limit = "----------lImIt_of_THE_fIle_eW_$"
      lines = []
      for key, value in fields.items():
          lines.append("--" + limit)
          lines.append(
              'Content-Disposition: form-data; name="%s"' % key
          )
          lines.append("")
          lines.append(value)
      for key, filename in files.items():
          if isinstance(filename, tuple):
              filename, data = filename
          else:
              with open(filename, mode="rb") as f:
                  data = f.read()
  
          lines.append("--" + limit)
          lines.append(
              f'Content-Disposition: form-data; name="{key}"; filename="{filename}"'
          )
          lines.append(
              "Content-Type: %s"
              % MONAILabelUtils.get_content_type(filename)
          )
          lines.append("")
          lines.append(data)
      lines.append("--" + limit + "--")
      lines.append("")
  
      body = bytearray()
      for line in lines:
          body.extend(
              line if isinstance(line, bytes) else line.encode("utf-8")
          )
          body.extend(b"\r\n")
  
      content_type = "multipart/form-data; boundary=%s" % limit
      return content_type, body
  
imports: import cgi
  import http.client
  import json
  import logging
  import mimetypes
  import os
  import tempfile
  from urllib.parse import quote_plus, urlparse
  import requests
label_desc: Use image node_id 6 for calling the MONAILabelUtils obj's underlying member method code with example usage: obj.encode_multipart_formdata(fields, files) and returns: content_type,  body