Personally, I don't really see the issue with just fetching the group policy by name to get the ID ...
It is a single API call per group policy and a loop. Example I use:
def getGPId(dashboard,templateId,gpName):
# Search for the group policy name
for gp in dashboard.networks.getNetworkGroupPolicies(templateId):
if gp['name']==gpName:
return(gp['groupPolicyId'])
raise SystemExit("Invalid group policy name supplied: "+gpName)
You could also record all the group policies return by the API call for later lookup.