'Returns None if it doesn\'t exist.'

def get_resource_by_id(self, rtype, obj_id):

    if (obj_id in self._deleted_ids_by_type[rtype]):
        return None
    cached_item = self._type_cache(rtype).get(obj_id)
    if cached_item:
        return cached_item
    self._flood_cache_for_query(rtype, id=(obj_id,))
    return self._type_cache(rtype).get(obj_id)
