@staticmethod
def _is_checkpointable_dataset(dataset):
    return (hasattr(dataset, 'get_classy_state') and hasattr(dataset, 'set_classy_state'))
@staticmethod
def _is_checkpointable_dataset(dataset):
    return (hasattr(dataset, 'get_classy_state') and hasattr(dataset, 'set_classy_state'))