nodes: 0, module; 1, function_definition; 2, function_name:normalize; 3, parameters; 4, block; 5, identifier:body_part_tup; 6, expression_statement; 7, return_statement; 8, comment:"""Normalize a tuple of BodyPart objects to a string.
  
      Normalization is done by sorting the body_parts by the Content- Disposition headers,
      which is typically on the form, ``form-data; name="name_of_part``.
  
      """; 9, call; 10, attribute; 11, argument_list; 12, string; 13, identifier:join; 14, list_comprehension; 15, string_content; 16, call; 17, for_in_clause; 18, escape_sequence:\n; 19, escape_sequence:\n; 20, attribute; 21, argument_list; 22, identifier:p; 23, call; 24, string; 25, identifier:format; 26, call; 27, attribute; 28, identifier:sorted; 29, argument_list; 30, string_content; 31, identifier:str; 32, argument_list; 33, identifier:p; 34, identifier:text; 35, identifier:body_part_tup; 36, keyword_argument; 37, escape_sequence:\n; 38, escape_sequence:\n; 39, subscript; 40, attribute; 41, identifier:key; 42, lambda; 43, attribute; 44, string; 45, identifier:p; 46, identifier:encoding; 47, lambda_parameters; 48, subscript; 49, identifier:p; 50, identifier:headers; 51, string_content:Content-Disposition; 52, identifier:p; 53, attribute; 54, string; 55, identifier:p; 56, identifier:headers; 57, string_content:Content-Disposition
code: def normalize(body_part_tup,):
      """Normalize a tuple of BodyPart objects to a string.
  
      Normalization is done by sorting the body_parts by the Content- Disposition headers,
      which is typically on the form, ``form-data; name="name_of_part``.
  
      """
      return '\n\n'.join(
          [
              '{}\n\n{}'.format(
                  str(p.headers[b'Content-Disposition'], p.encoding), p.text
              )
              for p in sorted(
                  body_part_tup, key=lambda p: p.headers[b'Content-Disposition']
              )
          ]
      )