def __contains__(self, gene_or_id):
if isinstance(gene_or_id, str):<EOL><INDENT>return gene_or_id in self.index<EOL><DEDENT>elif isinstance(gene_or_id, ExpGene):<EOL><INDENT>return gene_or_id.ensembl_id in self.index<EOL><DEDENT>else:<EOL><INDENT>return NotImplemented<EOL><DEDENT>
Tests whether a gene or ID is present.