def parse_custom_types(types):
    """
    Parses curstom types format as sent through the service.

    :param types: curstom types JSON
    :type types: list
    :return: custom types dictionary
    :rtype: dict
    """
    model_types = {}
    for typ in types:
        name = typ['name']
        model_types[name] = [
            x.lower().strip() for x in typ['keywords'].split(',')
        ]
    return model_types