@classmethod
def __subclasshook__(cls, candidate):
    EXPECTED_ATTRS = ('read', 'macrostructure', 'microstructure')
    return all((hasattr(candidate, attr) for attr in EXPECTED_ATTRS))
@classmethod
def __subclasshook__(cls, candidate):
    EXPECTED_ATTRS = ('read', 'macrostructure', 'microstructure')
    return all((hasattr(candidate, attr) for attr in EXPECTED_ATTRS))