def tense_id(*args, **kwargs):
<EOL>if len(args) == <NUM_LIT:1> and isinstance(args[<NUM_LIT:0>], (list, tuple)):<EOL><INDENT>if args[<NUM_LIT:0>] not in ((PRESENT, PARTICIPLE), (PAST, PARTICIPLE)):<EOL><INDENT>args = args[<NUM_LIT:0>]<EOL><DEDENT><DEDENT>if len(args) == <NUM_LIT:0> and len(kwargs) == <NUM_LIT:0>:<EOL><INDENT>t = INFINITIVE<EOL><DEDENT>else:<EOL><INDENT>t = PRESENT<EOL><DEDENT>tense   = kwargs.get("<STR_LIT>"  , args[<NUM_LIT:0>] if len(args) > <NUM_LIT:0> else t)<EOL>person  = kwargs.get("<STR_LIT>" , args[<NUM_LIT:1>] if len(args) > <NUM_LIT:1> else <NUM_LIT:3>) or None<EOL>number  = kwargs.get("<STR_LIT>" , args[<NUM_LIT:2>] if len(args) > <NUM_LIT:2> else SINGULAR)<EOL>mood    = kwargs.get("<STR_LIT>"   , args[<NUM_LIT:3>] if len(args) > <NUM_LIT:3> else INDICATIVE)<EOL>aspect  = kwargs.get("<STR_LIT>" , args[<NUM_LIT:4>] if len(args) > <NUM_LIT:4> else IMPERFECTIVE)<EOL>negated = kwargs.get("<STR_LIT>", args[<NUM_LIT:5>] if len(args) > <NUM_LIT:5> else False)<EOL>if mood in (PERFECTIVE, IMPERFECTIVE):<EOL><INDENT>mood, aspect = INDICATIVE, mood<EOL><DEDENT>if tense == INFINITIVE:<EOL><INDENT>person = number = mood = aspect = None; negated=False<EOL><DEDENT>if tense in ((PRESENT, PARTICIPLE), PRESENT+PARTICIPLE, PARTICIPLE, GERUND):<EOL><INDENT>tense, aspect = PRESENT, PROGRESSIVE<EOL><DEDENT>if tense in ((PAST, PARTICIPLE), PAST+PARTICIPLE):<EOL><INDENT>tense, aspect = PAST, PROGRESSIVE<EOL><DEDENT>if tense == IMPERFECT:<EOL><INDENT>tense, aspect = PAST, IMPERFECTIVE<EOL><DEDENT>if tense == PRETERITE:<EOL><INDENT>tense, aspect = PAST, PERFECTIVE<EOL><DEDENT>if aspect in (CONTINUOUS, PARTICIPLE, GERUND):<EOL><INDENT>aspect = PROGRESSIVE<EOL><DEDENT>if aspect == PROGRESSIVE:<EOL><INDENT>person = number = None<EOL><DEDENT>if tense == CONDITIONAL and mood == INDICATIVE:<EOL><INDENT>tense, mood = PRESENT, CONDITIONAL<EOL><DEDENT>return TENSES_ID.get(tense.lower(),<EOL>TENSES_ID.get((tense, person, number, mood, aspect, negated)))<EOL>
Returns the tense id for a given (tense, person, number, mood, aspect, negated).
        Aliases and compound forms (e.g., IMPERFECT) are disambiguated.