@_lambda_eval
def flat_map(self, query):
    return self.join(query._model_class).on(query._expression).map(*query._entities)
@_lambda_eval
def flat_map(self, query):
    return self.join(query._model_class).on(query._expression).map(*query._entities)