Retrieve Image sequence filepaths from bpy.types.TextureNode

Hi,
i need to retrieve all filepaths of texture node configured as source “SEQUENCE”.
Currently i am only able to retrieve TextureNode.image.filepath which points to the first texture frame filepath #0001.
I also am able to retrieve every single filepath from an image sequence using bpy.types.ImageUser by modifying the .frame_current value and querying the filepath_from_user(image_user). But, im not able or not seeing the way to perform the opposite operation which would be to set the filepaths of the imagesequence programmatically.

Is there something i am missing?

I tried searching around but no luck.

I also accessed the ImageSequence from bpy.context.sequences but the SequenceElements are empty and the filepath points still to the #0001 first texture frame filepath.

You can find the TextureNode current configuration i am using in the following screenshot.

Hi,
I will put the answer here since i finally managed to figure this out.
You need to use the ShaderNodeTexImage.image.filepath_from_user(image_user=image_user) where “image_user” is ShaderNodeTexImage.image_user.frame_current= i. Where “i” is the number of the frame.
By setting this property, the filepath_from_user will retrieve the filepath of the numbered texture like “.0002.png” where i=2.
Using a for range loop between the start frame and end frame you can retrieve the full list of texture files.

Seems to me you can just work out the frame names yourself. You know that Blender assumes they follow a numeric sequence anyway.