def parse_extensions(ext):
    """
    Parse the extensions as given in the format and convert it into a dictionary.
    <category>:<ext1> <ext2> <ext3> ....

    Args:
        ext (str): A string containing the extensions as the format given in the top of this file.

    Returns:
        dict: A dictionary representing the extensions with the key being the category
            and the value, a list containing all extensions as str.
    """
    extensions_map = {}
    for line in ext.split('\n'):
        try:
            category, extensions_list = line.split(':')
            extensions_list = extensions_list.split()
            extensions_list = list(
                filter(lambda x: x != '' or x != ' ', extensions_list))
            extensions_map[category] = extensions_list
        except Exception as e:
            print(e)
            print('WARNING: ERRORS WHILE READING EXTENSION LIST')
    return extensions_map