# Path: craft_ai/errors.py
# class CraftAiError(Exception):
#     """Base class for exceptions in the craft ai client."""
# 
#     def __init__(self, message=None, metadata=None):
#         self.message = message
#         self.metadata = metadata
#         super(CraftAiError, self).__init__(message, metadata)
# 
#     def __str__(self):
#         return repr(self.message)
# 
# Path: craft_ai/operators.py
# OPERATORS = OPERATORS_V2
# 
# Path: craft_ai/types.py
# TYPES = {
#     "continuous": "continuous",
#     "enum": "enum",
#     "boolean": "boolean",
#     "timezone": "timezone",
#     "time_of_day": "time_of_day",
#     "day_of_week": "day_of_week",
#     "day_of_month": "day_of_month",
#     "month_of_year": "month_of_year",
# }
# 
# TYPE_ANY = "any"


import datetime
import math
from craft_ai.errors import CraftAiError
from craft_ai.operators import OPERATORS
from craft_ai.types import TYPES, TYPE_ANY
        # One month in the interval
        if property_name:
            return "'{}' is {}".format(property_name, formatted_month_from)
        return formatted_month_from

    formatted_month_to = operand_formatter((12 + month_to - 1) % 12)

    if property_name:
        return "'{}' from {} to {}".format(
            property_name, formatted_month_from, formatted_month_to
        )

    return "{} to {}".format(formatted_month_from, formatted_month_to)


def _gte_formatter(property_name, operand, operand_formatter):
    if property_name:
        return "'{}' >= {}".format(property_name, operand_formatter(operand))
    return ">= {}".format(operand_formatter(operand))


def _lt_formatter(property_name, operand, operand_formatter):
    if property_name:
        return "'{}' < {}".format(property_name, operand_formatter(operand))
    return "< {}".format(operand_formatter(operand))


FORMATTER_FROM_DECISION_RULE = {
    OPERATORS["IS"]: {TYPE_ANY: _is_formatter},
    OPERATORS["IN_INTERVAL"]: {

# Path: craft_ai/errors.py
# class CraftAiError(Exception):
#     """Base class for exceptions in the craft ai client."""
# 
#     def __init__(self, message=None, metadata=None):
#         self.message = message
#         self.metadata = metadata
#         super(CraftAiError, self).__init__(message, metadata)
# 
#     def __str__(self):
#         return repr(self.message)
# 
# Path: craft_ai/operators.py
# OPERATORS = OPERATORS_V2
# 
# Path: craft_ai/types.py
# TYPES = {
#     "continuous": "continuous",
#     "enum": "enum",
#     "boolean": "boolean",
#     "timezone": "timezone",
#     "time_of_day": "time_of_day",
#     "day_of_week": "day_of_week",
#     "day_of_month": "day_of_month",
#     "month_of_year": "month_of_year",
# }
# 
# TYPE_ANY = "any"


# Path: craft_ai/formatters.py
import datetime
import math
from craft_ai.errors import CraftAiError
from craft_ai.operators import OPERATORS
from craft_ai.types import TYPES, TYPE_ANY

        # One month in the interval
        if property_name:
            return "'{}' is {}".format(property_name, formatted_month_from)
        return formatted_month_from

    formatted_month_to = operand_formatter((12 + month_to - 1) % 12)

    if property_name:
        return "'{}' from {} to {}".format(
            property_name, formatted_month_from, formatted_month_to
        )

    return "{} to {}".format(formatted_month_from, formatted_month_to)


def _gte_formatter(property_name, operand, operand_formatter):
    if property_name:
        return "'{}' >= {}".format(property_name, operand_formatter(operand))
    return ">= {}".format(operand_formatter(operand))


def _lt_formatter(property_name, operand, operand_formatter):
    if property_name:
        return "'{}' < {}".format(property_name, operand_formatter(operand))
    return "< {}".format(operand_formatter(operand))


FORMATTER_FROM_DECISION_RULE = {
    OPERATORS["IS"]: {TYPE_ANY: _is_formatter},
    OPERATORS["IN_INTERVAL"]: {

        TYPE_ANY: _in_formatter,