def METHOD_NAME(dist_path, version):
    """
    Copy metadata files for the metadata of the AppImage.
    """
    copied_files = {
        os.path.join("..", "icons", "cura-icon.svg"):         os.path.join("usr", "share", "icons", "hicolor", "scalable", "apps", "cura-icon.svg"),
        os.path.join("..", "icons", "cura-icon_64x64.png"):   os.path.join("usr", "share", "icons", "hicolor", "64x64", "apps", "cura-icon.png"),
        os.path.join("..", "icons", "cura-icon_128x128.png"): os.path.join("usr", "share", "icons", "hicolor", "128x128", "apps", "cura-icon.png"),
        os.path.join("..", "icons", "cura-icon_256x256.png"): os.path.join("usr", "share", "icons", "hicolor", "256x256", "apps", "cura-icon.png"),
        os.path.join("..", "icons", "cura-icon_256x256.png"): "cura-icon.png",
        "cura.appdata.xml": "cura.appdata.xml",
        "AppRun": "AppRun"
    }
    packaging_dir = os.path.dirname(__file__)
    for source, dest in copied_files.items():
        dest_file_path = os.path.join(dist_path, dest)
        os.makedirs(os.path.dirname(dest_file_path), exist_ok=True)
        shutil.copyfile(os.path.join(packaging_dir, source), dest_file_path)
    # Ensure that AppRun has the proper permissions: 755 (user reads, writes and executes, group reads and executes, world reads and executes).
    print("Changing permissions for AppRun")
    os.chmod(os.path.join(dist_path, "AppRun"), stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
    # Provision the Desktop file with the correct version number.
    template_path = os.path.join(packaging_dir, "cura.desktop.jinja")
    desktop_path = os.path.join(dist_path, "cura.desktop")
    print("Provisioning desktop file from", template_path, "to", desktop_path)
    with open(template_path, "r") as f:
        desktop_file = Template(f.read())
    with open(desktop_path, "w") as f:
        f.write(desktop_file.render(cura_version = version))