code: def batch_evaluate(
      evaluator: BooleanEvaluator, X: pd.DataFrame
  ) -> pd.Series:
      """
      Evaluate the truth value of the evaluator for each row of X, representing the assignments
  
      @param evaluator: a BooleanEvaluator, e.g., DnfRuleSet, Conjunction, etc.
      @param X: pandas dataframe where column names represent variable names used by the evaluator
      @return: pandas series of boolean values representing
      """
      assignments = X.to_dict("records")
      return pd.Series(
          list(
              map(
                  lambda assignment: evaluator.evaluate(assignment),
                  assignments,
              )
          )
      )
  
imports: import pandas
  from aix360.algorithms.rule_induction.trxf.core.boolean_evaluator import BooleanEvaluator
label_desc: Use image node_id 2 for calling a global function with example usage: batch_evaluate(evaluator, X) and returns: pd