nodes: 0, module; 1, function_definition; 2, function_name:_write; 3, parameters; 4, block; 5, identifier:self; 6, identifier:lines; 7, identifier:fname; 8, expression_statement; 9, with_statement; 10, comment:"""
          Writes a intermediate temporary sorted file
  
          :param lines: The lines to write.
          :param fname: The name of the temporary file.
          :return:
          """; 11, with_clause; 12, block; 13, with_item; 14, for_statement; 15, as_pattern; 16, identifier:line; 17, call; 18, block; 19, call; 20, as_pattern_target; 21, identifier:sorted; 22, argument_list; 23, expression_statement; 24, identifier:open; 25, argument_list; 26, identifier:out_fhndl; 27, identifier:lines; 28, keyword_argument; 29, call; 30, identifier:fname; 31, string; 32, identifier:key; 33, attribute; 34, attribute; 35, argument_list; 36, string_content:wb; 37, identifier:self; 38, identifier:key; 39, identifier:pickle; 40, identifier:dump; 41, identifier:line; 42, identifier:out_fhndl
code: def _write(self, lines, fname):
          """
          Writes a intermediate temporary sorted file
  
          :param lines: The lines to write.
          :param fname: The name of the temporary file.
          :return:
          """
          with open(fname, 'wb') as out_fhndl:
              for line in sorted(lines, key=self.key):
                  pickle.dump(line, out_fhndl)