def METHOD_NAME(name):
    # If the given (file)name does not exist, fall back to searching for its basename in sys._MEIPASS, where
    # PyInstaller usually collects shared libraries.
    if name and not os.path.isfile(name):
        frozen_name = os.path.join(sys._MEIPASS, os.path.basename(name))
        if os.path.isfile(frozen_name):
            name = frozen_name
    return name