def __getitem__(self, index: Union[SchemaKey, int, str]) -> dict:
LOGGER.debug('<STR_LIT>', index)<EOL>rv = None<EOL>if isinstance(index, SchemaKey):<EOL><INDENT>rv = self._schema_key2schema[index]<EOL><DEDENT>elif isinstance(index, int) or (isinstance(index, str) and '<STR_LIT>' not in index):<EOL><INDENT>try:<EOL><INDENT>rv = self._schema_key2schema[self._seq_no2schema_key[int(index)]]<EOL><DEDENT>except KeyError:<EOL><INDENT>LOGGER.debug('<STR_LIT>', index)<EOL>raise CacheIndex('<STR_LIT:{}>'.format(index))<EOL><DEDENT><DEDENT>elif isinstance(index, str):<EOL><INDENT>rv = self._schema_key2schema[schema_key(index)]<EOL><DEDENT>else:<EOL><INDENT>LOGGER.debug('<STR_LIT>', index)<EOL>raise CacheIndex('<STR_LIT>'.format(index))<EOL><DEDENT>LOGGER.debug('<STR_LIT>', rv)<EOL>return rv<EOL>
Get schema by schema key, sequence number, or schema identifier. Raise CacheIndex for no such schema.

Raise CacheIndex for no such index in schema store.

:param index: schema key, sequence number, or schema identifier
:return: corresponding schema or None