nodes: 0, module; 1, function_definition; 2, function_name:get_realnames; 3, parameters; 4, block; 5, identifier:packages; 6, expression_statement; 7, return_statement; 8, comment:"""
      Return list of unique case-correct package names.
  
      Packages are listed in a case-insensitive sorted order.
      """; 9, call; 10, identifier:sorted; 11, argument_list; 12, set_comprehension; 13, keyword_argument; 14, attribute; 15, for_in_clause; 16, identifier:key; 17, lambda; 18, call; 19, identifier:project_name; 20, identifier:p; 21, identifier:packages; 22, lambda_parameters; 23, call; 24, identifier:get_distribution; 25, argument_list; 26, identifier:n; 27, attribute; 28, argument_list; 29, identifier:p; 30, identifier:n; 31, identifier:lower
code: def get_realnames(packages):
      """
      Return list of unique case-correct package names.
  
      Packages are listed in a case-insensitive sorted order.
      """
      return sorted({get_distribution(p).project_name for p in packages},
                    key=lambda n: n.lower())