code: def extract_first_part(message, boundary):
      
      first_message = message.split(boundary)[1].lstrip()
      if first_message.endswith(b'\r\n'):
          first_message = first_message[:-2]
      else:
          first_message = first_message[:-1]
      return first_message
docs: Function to extract the first part of a multipart message