How to export Segmentation as gtlf using python code

Greetings!
I need to export Segmentation as ONE gtlf file. I noticed I can use SlicerOpenAnatomy, but using the python code——

exporter = vtk.vtkGLTFExporter()
exporter.SetRenderWindow(slicer.app.layoutManager().threeDWidget(0).threeDView().renderWindow())
exporter.SetFileName("c:/tmp/newfolder/mymodel.gltf")
exporter.Write()

——will export the entire scene and create a gltf file and several bin files.
like this:
1661094927326

Could anyone help me find the code that can export the Segmentation to ONE gtlf file?
like this:
image
Thank you so much!