<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getDisplaySize(data_type_oid, type_modifier):
 """ Returns the column display size for the given Vertica type with consideration of the type modifier. The display size of a column is the maximum number of characters needed to display data in character form. """


    if data_type_oid == VerticaType.BOOL:
        # T or F
        return 1
    elif data_type_oid == VerticaType.INT8:
        # a sign and 19 digits if signed or 20 digits if unsigned
        return 20
    elif data_type_oid == VerticaType.FLOAT8:
        # a sign, 15 digits, a decimal point, the letter E, a sign, and 3 digits
        return 22
    elif data_type_oid == VerticaType.NUMERIC:
        # a sign, precision digits, and a decimal point
        return getPrecision(data_type_oid, type_modifier) + 2
    elif data_type_oid == VerticaType.DATE:
        # yyyy-mm-dd, a space, and the calendar era (BC)
        return 13
    elif data_type_oid == VerticaType.TIME:
        seconds_precision = getPrecision(data_type_oid, type_modifier)
        if seconds_precision == 0:
            # hh:mm:ss
            return 8
        else:
            # hh:mm:ss.[fff...]
            return 9 + seconds_precision
    elif data_type_oid == VerticaType.TIMETZ:
        seconds_precision = getPrecision(data_type_oid, type_modifier)
        if seconds_precision == 0:
            # hh:mm:ss, a sign, hh:mm
            return 14
        else:
            # hh:mm:ss.[fff...], a sign, hh:mm
            return 15 + seconds_precision
    elif data_type_oid == VerticaType.TIMESTAMP:
        seconds_precision = getPrecision(data_type_oid, type_modifier)
        if seconds_precision == 0:
            # yyyy-mm-dd hh:mm:ss, a space, and the calendar era (BC)
            return 22
        else:
            # yyyy-mm-dd hh:mm:ss[.fff...], a space, and the calendar era (BC)
            return 23 + seconds_precision
    elif data_type_oid == VerticaType.TIMESTAMPTZ:
        seconds_precision = getPrecision(data_type_oid, type_modifier)
        if seconds_precision == 0:
            # yyyy-mm-dd hh:mm:ss, a sign, hh:mm, a space, and the calendar era (BC)
            return 28
        else:
            # yyyy-mm-dd hh:mm:ss.[fff...], a sign, hh:mm, a space, and the calendar era (BC)
            return 29 + seconds_precision
    elif data_type_oid in (VerticaType.INTERVAL, VerticaType.INTERVALYM):
        leading_precision = getIntervalLeadingPrecision(data_type_oid, type_modifier)
        seconds_precision = getPrecision(data_type_oid, type_modifier)
        interval_range = getIntervalRange(data_type_oid, type_modifier)
        if interval_range in ("Year", "Month", "Day", "Hour", "Minute"):
            # a sign, [range...]
            return 1 + leading_precision
        elif interval_range in ("Day to Hour", "Year to Month", "Hour to Minute"):
            # a sign, [dd...] hh; a sign, [yy...]-mm; a sign, [hh...]:mm
            return 1 + leading_precision + 3
        elif interval_range == "Day to Minute":
            # a sign, [dd...] hh:mm
            return 1 + leading_precision + 6
        elif interval_range == "Second":
            if seconds_precision == 0:
                # a sign, [ss...]
                return 1 + leading_precision
            else:
                # a sign, [ss...].[fff...]
                return 1 + leading_precision + 1 + seconds_precision
        elif interval_range == "Day to Second":
            if seconds_precision == 0:
                # a sign, [dd...] hh:mm:ss
                return 1 + leading_precision + 9
            else:
                # a sign, [dd...] hh:mm:ss.[fff...]
                return 1 + leading_precision + 10 + seconds_precision
        elif interval_range == "Hour to Second":
            if seconds_precision == 0:
                # a sign, [hh...]:mm:ss
                return 1 + leading_precision + 6
            else:
                # a sign, [hh...]:mm:ss.[fff...]
                return 1 + leading_precision + 7 + seconds_precision
        elif interval_range == "Minute to Second":
            if seconds_precision == 0:
                # a sign, [mm...]:ss
                return 1 + leading_precision + 3
            else:
                # a sign, [mm...]:ss.[fff...]
                return 1 + leading_precision + 4 + seconds_precision
    elif data_type_oid == VerticaType.UUID:
        # aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
        return 36
    elif data_type_oid in (VerticaType.CHAR,
                           VerticaType.VARCHAR,
                           VerticaType.BINARY,
                           VerticaType.VARBINARY,
                           VerticaType.UNKNOWN):
        # the defined maximum octet length of the column
        return MAX_STRING_LEN if type_modifier <= -1 else (type_modifier - 4)
    elif data_type_oid in (VerticaType.LONGVARCHAR,
                           VerticaType.LONGVARBINARY):
        return MAX_LONG_STRING_LEN if type_modifier <= -1 else (type_modifier - 4)
    else:
        return None