code: def _validate_predicate(relation, value):
      if (
          (isinstance(value, str) or isinstance(value, bool))
          and relation != Relation.EQ
          and relation != Relation.NEQ
      ):
          raise ValueError(
              'String or boolean value "{}" can only be compared through "==" or "!=" but was "{}"'.format(
                  value, relation.value
              )
          )
  
imports: import math
  from enum import Enum
  from typing import Dict, Any
  from aix360.algorithms.rule_induction.trxf.core.boolean_evaluator import BooleanEvaluator
  from aix360.algorithms.rule_induction.trxf.core.feature import Feature, is_number
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_predicate(relation, value) without return types