def METHOD_NAME(cls, name, location):
    if cls.dont_use_cached_bitmaps:
        return cls.loadBitmap(name, location)
    path = "%s%s" % (name, location)
    if len(cls.cached_bitmaps) == cls.max_cached_bitmaps:
        cls.cached_bitmaps.popitem(False)
    if path not in cls.cached_bitmaps:
        bmp = cls.loadBitmap(name, location)
        cls.cached_bitmaps[path] = bmp
    else:
        bmp = cls.cached_bitmaps[path]
    return bmp