def get_sparse_matrix_keys ( session , key_table ) : return session . query ( key_table ) . order_by ( key_table . name ) . all ( )
epython example of sorted key
Return a list of keys for the sparse matrix .
def get_sparse_matrix_keys(session, key_table):
    """Return a list of keys for the sparse matrix."""
    return session.query(key_table).order_by(key_table.name).all()