nodes: 0, module; 1, function_definition; 2, function_name:sorted_proposals; 3, parameters; 4, block; 5, identifier:proposals; 6, default_parameter; 7, default_parameter; 8, expression_statement; 9, expression_statement; 10, return_statement; 11, identifier:scopepref; 12, None; 13, identifier:typepref; 14, None; 15, comment:"""Sort a list of proposals
  
      Return a sorted list of the given `CodeAssistProposal`\s.
  
      `scopepref` can be a list of proposal scopes.  Defaults to
      ``['parameter_keyword', 'local', 'global', 'imported',
      'attribute', 'builtin', 'keyword']``.
  
      `typepref` can be a list of proposal types.  Defaults to
      ``['class', 'function', 'instance', 'module', None]``.
      (`None` stands for completions with no type like keywords.)
      """; 16, assignment; 17, call; 18, identifier:sorter; 19, call; 20, attribute; 21, argument_list; 22, identifier:_ProposalSorter; 23, argument_list; 24, identifier:sorter; 25, identifier:get_sorted_proposal_list; 26, identifier:proposals; 27, identifier:scopepref; 28, identifier:typepref
code: def sorted_proposals(proposals, scopepref=None, typepref=None):
      """Sort a list of proposals
  
      Return a sorted list of the given `CodeAssistProposal`\s.
  
      `scopepref` can be a list of proposal scopes.  Defaults to
      ``['parameter_keyword', 'local', 'global', 'imported',
      'attribute', 'builtin', 'keyword']``.
  
      `typepref` can be a list of proposal types.  Defaults to
      ``['class', 'function', 'instance', 'module', None]``.
      (`None` stands for completions with no type like keywords.)
      """
      sorter = _ProposalSorter(proposals, scopepref, typepref)
      return sorter.get_sorted_proposal_list()