def get_plural_tag_index(number, locale):
locale = Locale.parse(locale)<EOL>plural_rule = locale.plural_form<EOL>used_tags = plural_rule.tags | set([_fallback_tag])<EOL>tag, index = plural_rule(number), <NUM_LIT:0><EOL>for _tag in _plural_tags:<EOL><INDENT>if _tag == tag:<EOL><INDENT>return index<EOL><DEDENT>if _tag in used_tags:<EOL><INDENT>index += <NUM_LIT:1><EOL><DEDENT><DEDENT>
Gets the plural tag index of a number on the plural rule of a locale::

       >>> get_plural_tag_index(1, 'en_US')
       0
       >>> get_plural_tag_index(2, 'en_US')
       1
       >>> get_plural_tag_index(100, 'en_US')
       1