from typing import Dict


def get_extension_to_lang(config: Dict):
    """Based on configuration, return a dictionary that maps file extension to a specific language,
    such python, javascript etc.

    Args:
        config (dict): Configuration.
    """
    extension_to_lang = {}
    for lang_name, conf_dict in config["languages"].items():
        for ext in conf_dict["extensions"]:
            extension_to_lang[ext] = lang_name

    return extension_to_lang