from typing import List
from typing import Dict


def get_topical_sentences(
    sentences: List[str], topics: Dict[str, List[str]]
) -> Dict[str, List[str]]:
    """
    Get lists of sentences per topic, based on the presence of
    words that are a part of the topic.

    Args:
        sentences (List[str]):
            List of sentences to analyse.
        topics (Dict[str, List[str]]):
            Dictionary of words per topic.

    Returns:
        Dict[str, List[str]]:
            Dictionary of sentences per topic.
    """
    topical_sentences = dict()
    for topic in topics:
        topical_sentences[topic] = list()
    for sentence in sentences:
        for topic in topics:
            if any(topical_word in sentence.lower() for topical_word in topics[topic]):
                topical_sentences[topic].append(sentence)
    return topical_sentences