code: def BinaryBool(pred):
      
      class Predicate(Bool):
          def __init__(self, value, ignore_case=False):
              self.value = caseless(value) if ignore_case else value
              self.ignore_case = ignore_case
  
          def __call__(self, data):
              if not isinstance(data, list):
                  data = [data]
              for d in data:
                  try:
                      if pred(caseless(d) if self.ignore_case else d, self.value):
                          return True
                  except:
                      pass
              return False
      return Predicate
docs: Lifts predicates that take an argument into the DSL.