def sorted_keywords_by_order(keywords, order):
    for key, value in list(keywords.items()):
        if value is None:
            del keywords[key]
    ordered_keywords = OrderedDict()
    for key in order:
        if key in list(keywords.keys()):
            ordered_keywords[key] = keywords.get(key)
    for keyword in keywords:
        if keyword not in order:
            ordered_keywords[keyword] = keywords.get(keyword)
    return ordered_keywords