def get_category(extension, extension_map):
    """
    Gets the category of the extension like (ebook for a pdf file).
    Note: The extension must not start with a '.'

    Args:
        extension (str): String for which the category has to be found.
        extension_map (dict): A dictionary containing the category as the key, value is list of extensions.

    Returns:
        str: Returns a string which is the category of the given extension.
    """
    for category, extension_list in extension_map.items():
        if extension in extension_list:
            return category
    return ''