<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def make_interval(long_name, short_name):
 """ Create an interval segment """

    return Group(
        Regex("(-+)?[0-9]+")
        + (
            upkey(long_name + "s")
            | Regex(long_name + "s").setParseAction(upcaseTokens)
            | upkey(long_name)
            | Regex(long_name).setParseAction(upcaseTokens)
            | upkey(short_name)
            | Regex(short_name).setParseAction(upcaseTokens)
        )
    ).setResultsName(long_name)