from typing import List


def get_valid_package_keys_matching(all_keys: List,
                                    input_key: str) -> List[str]:
    """Return a list of keys of graph nodes that match a package input.

    For our use case (matching user input to package nodes),
    a valid key is one that ends with the input, case insensitive.
    For example, 'apphooks' matches 'org.chromium.browser.AppHooks'.
    """
    input_key_lower = input_key.lower()
    return [key for key in all_keys if key.lower().endswith(input_key_lower)]