Privlige issue for WRITE_QUERY

I have successfully connected Pyhton with Tigergraph using pyTigergraph.

On running the command below :

print(connection.gsql('CREATE QUERY DDL() FOR GRAPH sample_graph { PRINT "DDL WORKS!"; }'))

It shows the result :

User <user_name> does not have the permission to run the command. Required privilege on global: WRITE_QUERY.

I have changed the access of this user to include WRITE_QUERY on the local level using Admin Portal. However it still doesn’t work because of global level access. Is there any alternative to this situation ?