def is_leonardo_module(mod):
    """returns True if is leonardo module
    """

    if hasattr(mod, 'default') \
            or hasattr(mod, 'leonardo_module_conf'):
        return True
    for key in dir(mod):
        if 'LEONARDO' in key:
            return True
    return False