Cannot move section

Hi! I can successfully create a new section MyNewSection via the Python-API like this:

new_section = client.sections.create_section_for_project(name='MyNewSection', project_gid=project_id)

What I want to do now, is to move this section but it never works.

In the project I want to move there are 4 sections. Section1, Section2, Section3, and MyNewSection

I use the project gid (pgid) , the gid (S2gid) of the section I want to insert MyNewSection before (I want to move it before Section2:

I tried this code, but no luck. It does not produce any errors, but it also does not move the section:

updated_section=client.sections.insert_section_for_project(pgid, insert_before=S2gid,section=MyNewSection['gid'])

Do you have any experience why my syntax fails? Many thanks for your help!