def datasets_for_lddas(trans, lddas):
 dataset_ids = [x.dataset_id for x in lddas]
 datasets = trans.sa_session.query(trans.app.model.Dataset).filter(trans.app.model.Dataset.id.in_(dataset_ids)).all()
 return datasets

def datasets_for_lddas ( trans , lddas ) : dataset_ids = [ x . dataset_id for x in lddas ] datasets = trans . sa_session . query ( trans . app . model . Dataset ) . filter ( trans . app . model . Dataset . id . in_ ( dataset_ids ) ) . all ( ) return datasets
given a list of lddas .