def _is_leonardo_module(whatever):
    '''check if is leonardo module'''

    # check if is python module
    if hasattr(whatever, 'default') \
            or hasattr(whatever, 'leonardo_module_conf'):
        return True

    # check if is python object
    for key in dir(whatever):
        if key in 'LEONARDO':
            return True
dataset/ETHPy150Open django-leonardo/django-leonardo/leonardo/utils/settings.py/_is_leonardo_module/swapped operands of `in`