def METHOD_NAME(self):
    for time, states_and_metadata in self.data_gen():
        yield time, {Detection(state.state_vector, state.timestamp, metadata)
                     for state, metadata in states_and_metadata}