<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_check_declaration_sql(self, definition):
 """ Obtains DBMS specific SQL code portion needed to set a CHECK constraint declaration to be used in statements like CREATE TABLE. :param definition: The check definition :type definition: dict :return: DBMS specific SQL code portion needed to set a CHECK constraint. :rtype: str """

        constraints = []
        for field, def_ in definition.items():
            if isinstance(def_, basestring):
                constraints.append("CHECK (%s)" % def_)
            else:
                if "min" in def_:
                    constraints.append("CHECK (%s >= %s)" % (field, def_["min"]))

                if "max" in def_:
                    constraints.append("CHECK (%s <= %s)" % (field, def_["max"]))

        return ", ".join(constraints)