code: def to_int(value: Any) -> int:
          
  
          if isinstance(value, (bool, int)):
              return int(value)
          return int(str(value))
docs: Cast a value as its equivalent int for indy predicate argument. Raise ValueError for any input but
          int, stringified int, or boolean.
  
          :param value: value to coerce.