How do I associate global parameters with Python?

I need to associate a global parameter to a element instance parameter. There seems to be an API possibility for that: http://www.revitapidocs.com/2017.1/796f3d95-956e-a2a9-7f8e-e8efd2a0eea0.htm.
Can someone help me how to use this “AssociateWithGlobalParameter(ElementId gpId)” in a working python script?