docstr: Check whether the query is satisfied
  
  Args:
      df: dataframe
      relation_query: a relational query returns a bool
  
  Returns:
      A list of true indices
docstr_tok: ["Check","whether","the","query","is","satisfied","Args",":","df",":","dataframe","relation_query",":","a","relational","query","returns","a","bool","Returns",":","A","list","of","true","indices"]
code: def relational_filter(cls, df: pd.DataFrame, relation_query: str):
      """
      Check whether the query is satisfied
  
      Args:
          df: dataframe
          relation_query: a relational query returns a bool
  
      Returns:
          A list of true indices
      """
  
      valid_df = df.query(relation_query)
      return valid_df.index.to_list()
  
file_path: contextual-ai/xai/data/validator/dataframe_validator.py
imports: import operator
  from collections import Counter
  from typing import List, Tuple
  import pandas
  from xai.data.exceptions import ColumnNotFound
label_desc: Use image node_id 5 for calling the DataframeValidator obj's underlying member method code with example usage: obj.relational_filter(cls, df, relation_query) and returns: valid_df