'The reverse of the id_from_string() method. Given a supplied numeric
identifier for a resource class, we look up the corresponding string
representation, either in the list of standard resource classes or via
a DB lookup. The results of these DB lookups are cached since the
lookups are so frequent.
:param rc_id: The numeric representation of the resource class to look
up a string identifier for.
:returns: string identifier for the resource class, or None, if no such
resource class was found in the list of standard resource
classes or the resource_classes database table.
:raises `exception.ResourceClassNotFound` if rc_id cannot be found in
either the standard classes or the DB.'

def string_from_id(self, rc_id):

    try:
        return fields.ResourceClass.STANDARD[rc_id]
    except IndexError:
        pass
    with lockutils.lock(_LOCKNAME):
        if (rc_id in self.str_cache):
            return self.str_cache[rc_id]
        _refresh_from_db(self.ctx, self)
        if (rc_id in self.str_cache):
            return self.str_cache[rc_id]
        raise exception.ResourceClassNotFound(resource_class=rc_id)
