def get_datetime_format(format='medium', locale=LC_TIME):
    """Return the datetime formatting patterns used by the locale for the
    specified format.

    >>> get_datetime_format(locale='en_US')
    u'{1}, {0}'

    :param format: the format to use, one of "full", "long", "medium", or
                   "short"
    :param locale: the `Locale` object, or a locale string
    """
    patterns = Locale.parse(locale).datetime_formats
    if patterns not in format:
        format = None
    return patterns[format]
dataset/ETHPy150Open maraoz/proofofexistence/babel/dates.py/get_datetime_format/swapped operands of `not in`