nodes: 0, module; 1, function_definition; 2, function_name:substring_search; 3, parameters; 4, block; 5, identifier:word; 6, identifier:collection; 7, expression_statement; 8, return_statement; 9, comment:"""Find all matches in the `collection` for the specified `word`.
  
      If `word` is empty, returns all items in `collection`.
  
      :type word: str
      :param word: The substring to search for.
  
      :type collection: collection, usually a list
      :param collection: A collection of words to match.
  
      :rtype: list of strings
      :return: A sorted list of matching words from collection.
      """; 10, list_comprehension; 11, identifier:item; 12, for_in_clause; 13, if_clause; 14, identifier:item; 15, call; 16, call; 17, identifier:sorted; 18, argument_list; 19, attribute; 20, argument_list; 21, identifier:collection; 22, identifier:item; 23, identifier:startswith; 24, identifier:word
code: def substring_search(word, collection):
      """Find all matches in the `collection` for the specified `word`.
  
      If `word` is empty, returns all items in `collection`.
  
      :type word: str
      :param word: The substring to search for.
  
      :type collection: collection, usually a list
      :param collection: A collection of words to match.
  
      :rtype: list of strings
      :return: A sorted list of matching words from collection.
      """
      return [item for item in sorted(collection) if item.startswith(word)]