Need help with sound unreal.soundwave options

Hello! I’m attempting to use python to modify various options for soundwaves that I import. I have taken a look at the class documentation for both [soundwave]unreal.SoundWave — Unreal Python 5.0 (Experimental) documentation) and soundfactory but am not quite sure of the correct usage, as anything pertaining to this is difficult to find online.

Here I have an example snippet, where I try to automatically create a soundcue for imported sounds, and set a soundclass on them, however when I import the assets the soundclasses are empty and the cues are not created.

Any help would be appreciated!

def buildImportTask(filename, destination_path):
    task = unreal.AssetImportTask()
    task.set_editor_property('automated', False)
    ... other import options
    
    sound_factory = unreal.SoundFactory()
    sound_factory.set_editor_property('auto_create_cue', True)
    task.set_editor_property('factory', sound_factory)
    
    sound_class_path = '/Game/Audio/_SoundClasses/Soundclass_Master'
    sound_class_asset = unreal.load_asset(sound_class_path)
    
    sound_wave = unreal.SoundWave()
    sound_wave.set_editor_property('sound_class_object', sound_class_asset)
    return task