class_docstr: The ``MultipartDecoder`` object parses the multipart payload of
  a bytestring into a tuple of ``Response``-like ``BodyPart`` objects.
  
  The basic usage is::
  
      import requests
      from requests_toolbelt import MultipartDecoder
  
      response = requests.get(url)
      decoder = MultipartDecoder.from_response(response)
      for part in decoder.parts:
          print(part.headers['content-type'])
  
  If the multipart content is not from a response, basic usage is::
  
      from requests_toolbelt import MultipartDecoder
  
      decoder = MultipartDecoder(content, content_type)
      for part in decoder.parts:
          print(part.headers['content-type'])
  
  For both these usages, there is an optional ``encoding`` parameter. This is
  a string, which is the name of the unicode codec to use (default is
  ``'utf-8'``).
class_docstr_tok: ["The","``","MultipartDecoder","``","object","parses","the","multipart","payload","of","a","bytestring","into","a","tuple","of","``","Response","``","-like","``","BodyPart","``","objects",".","The","basic","usage","is",":",":","import","requests","from","requests_toolbelt","import","MultipartDecoder","response","=","requests.get","(","url",")","decoder","=","MultipartDecoder.from_response","(","response",")","for","part","in","decoder.parts",":","print","(","part.headers","[","'content-type","'","]",")","If","the","multipart","content","is","not","from","a","response",",","basic","usage","is",":",":","from","requests_toolbelt","import","MultipartDecoder","decoder","=","MultipartDecoder","(","content",",","content_type",")","for","part","in","decoder.parts",":","print","(","part.headers","[","'content-type","'","]",")","For","both","these","usages",",","there","is","an","optional","``","encoding","``","parameter",".","This","is","a","string",",","which","is","the","name","of","the","unicode","codec","to","use","(","default","is","``","'utf-8","'","``",")","."]
code: def _find_boundary(self):
      ct_info = tuple(x.strip() for x in self.content_type.split(";"))
      mimetype = ct_info[0]
      if mimetype.split("/")[0].lower() != "multipart":
          raise NonMultipartContentTypeException(
              "Unexpected mimetype in content-type: '{}'".format(
                  mimetype
              )
          )
      for item in ct_info[1:]:
          attr, value = _split_on_find(item, "=")
          if attr.lower() == "boundary":
              self.boundary = encode_with(
                  value.strip('"'), self.encoding
              )
  
imports: import sys
  import email.parser
  from .encoder import encode_with
  from requests.structures import CaseInsensitiveDict
label_desc: Use image node_id 2 for calling the MultipartDecoder obj's underlying member method code with example usage: obj._find_boundary() without return types