nodes: 0, module; 1, function_definition; 2, function_name:get_parents; 3, parameters; 4, block; 5, expression_statement; 6, expression_statement; 7, expression_statement; 8, expression_statement; 9, return_statement; 10, comment:"""Return sorted list of names of packages without dependants."""; 11, assignment; 12, assignment; 13, assignment; 14, call; 15, identifier:distributions; 16, call; 17, identifier:remaining; 18, set_comprehension; 19, identifier:requirements; 20, set_comprehension; 21, identifier:get_realnames; 22, argument_list; 23, identifier:get_installed_distributions; 24, argument_list; 25, call; 26, for_in_clause; 27, call; 28, for_in_clause; 29, for_in_clause; 30, binary_operator:remaining - requirements; 31, keyword_argument; 32, attribute; 33, argument_list; 34, identifier:d; 35, identifier:distributions; 36, attribute; 37, argument_list; 38, identifier:d; 39, identifier:distributions; 40, identifier:r; 41, call; 42, identifier:remaining; 43, identifier:requirements; 44, identifier:user_only; 45, identifier:ENABLE_USER_SITE; 46, attribute; 47, identifier:lower; 48, attribute; 49, identifier:lower; 50, attribute; 51, argument_list; 52, identifier:d; 53, identifier:project_name; 54, identifier:r; 55, identifier:project_name; 56, identifier:d; 57, identifier:requires
code: def get_parents():
      """Return sorted list of names of packages without dependants."""
      distributions = get_installed_distributions(user_only=ENABLE_USER_SITE)
      remaining = {d.project_name.lower() for d in distributions}
      requirements = {r.project_name.lower() for d in distributions for
                      r in d.requires()}
  
      return get_realnames(remaining - requirements)