def _validate_indexer(self, form, key, kind):
assert kind in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']<EOL>if key is None:<EOL><INDENT>pass<EOL><DEDENT>elif is_integer(key):<EOL><INDENT>pass<EOL><DEDENT>elif kind in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>self._invalid_indexer(form, key)<EOL><DEDENT>return key<EOL>
If we are positional indexer, validate that we have appropriate
typed bounds must be an integer.