docs: def to_decimal(value, ctx):
      """
      Tries conversion of any value to a decimal
      """
      if isinstance(value, bool):
          return Decimal(1) if value else Decimal(0)
      elif isinstance(value, int):
          return Decimal(value)
      elif isinstance(value, Decimal):
          return value
      elif isinstance(value, str):
          try:
              return Decimal(value)
          except Exception:
              pass
  
      raise EvaluationError("Can't convert '%s' to a decimal" % str(value))