def __contains__(self, key):
if self.typeId is None:<EOL><INDENT>(classIdentifier, orgId, typeId, deviceId) = key.split("<STR_LIT::>")<EOL>deviceUrl = "<STR_LIT>" % (typeId, deviceId)<EOL><DEDENT>else:<EOL><INDENT>deviceUrl = "<STR_LIT>" % (self.typeId, key)<EOL><DEDENT>r = self._apiClient.get(deviceUrl)<EOL>if r.status_code == <NUM_LIT:200>:<EOL><INDENT>return True<EOL><DEDENT>elif r.status_code == <NUM_LIT>:<EOL><INDENT>return False<EOL><DEDENT>else:<EOL><INDENT>raise ApiException(r)<EOL><DEDENT>
Does a device exist?