@classmethod<EOL><INDENT>def get_value_based_inclusive_interval(cls, field, max_value=None):<DEDENT>
if field.max_value is None:<EOL><INDENT>field.max_value = max_value or MAX_LENGTH<EOL><DEDENT>if field.min_value is None:<EOL><INDENT>field.min_value = <NUM_LIT:0><EOL><DEDENT>Interval = namedtuple('<STR_LIT>', ['<STR_LIT:start>', '<STR_LIT>'])<EOL>return Interval(start=field.min_value, stop=field.max_value)<EOL>
This is applicable to fields with max_value and min_value as
validators.

Note:
    1. This is different from fields with max_length as a validator
    2. This means that the two methods based on value and length
        are almost the same method but for the max_* attribute
        that is being checked. Probably need to DRY this out at
        some point.