try:
    from foo import Bar
except ImportError:
    class Bar:
        pass
