docs: def to_boolean(value, ctx):
      """
      Tries conversion of any value to a boolean
      """
      if isinstance(value, bool):
          return value
      elif isinstance(value, int):
          return value != 0
      elif isinstance(value, Decimal):
          return value != Decimal(0)
      elif isinstance(value, str):
          value = value.lower()
          if value == 'true':
              return True
          elif value == 'false':
              return False
      elif isinstance(value, datetime.date) or isinstance(value, datetime.time):
          return True
  
      raise EvaluationError("Can't convert '%s' to a boolean" % str(value))