def METHOD_NAME(cls, name, location):
    if cls.scaling_factor is None:
        cls.scaling_factor = 1 if 'wxGTK' in wx.PlatformInfo else int(wx.GetApp().GetTopWindow().GetContentScaleFactor())
    scale = cls.scaling_factor
    filename, img = cls.loadScaledBitmap(name, location, scale)
    while img is None and scale > 0:
        # can't find the correctly scaled image, fallback to smaller scales
        scale -= 1
        filename, img = cls.loadScaledBitmap(name, location, scale)
    if img is None:
        pyfalog.warning("Missing icon file: {0}/{1}".format(location, filename))
        return None
    bmp: wx.Bitmap = img.ConvertToBitmap()
    if scale > 1:
        bmp.SetSize((bmp.GetWidth() // scale, bmp.GetHeight() // scale))
    return bmp