<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getIntervalLeadingPrecision(data_type_oid, type_modifier):
 """ Returns the leading precision for an interval, which is the largest number of digits that can fit in the leading field of the interval. All Year/Month intervals are defined in terms of months, even if the type_modifier forbids months to be specified (i.e. INTERVAL YEAR). Similarly, all Day/Time intervals are defined as a number of microseconds. Because of this, interval types with shorter ranges will have a larger leading precision. For example, an INTERVAL DAY's leading precision is ((2^63)-1)/MICROSECS_PER_DAY, while an INTERVAL HOUR's leading precision is ((2^63)-1)/MICROSECS_PER_HOUR """


    interval_range = getIntervalRange(data_type_oid, type_modifier)
    if interval_range in ("Year", "Year to Month"):
        return 18
    elif interval_range == "Month":
        return 19
    elif interval_range in ("Day", "Day to Hour", "Day to Minute", "Day to Second"):
        return 9
    elif interval_range in ("Hour", "Hour to Minute", "Hour to Second"):
        return 10
    elif interval_range in ("Minute", "Minute to Second"):
        return 12
    elif interval_range == "Second":
        return 13
    else:
        raise ValueError("Invalid interval range: {}".format(interval_range))