Here is some sample code:
def getTemplateId(dashboard,orgId,templateName):
# Search for the template
for template in dashboard.organizations.getOrganizationConfigTemplates(orgId):
if template['name'] == templateName:
return(template['id'])
raise SystemExit("Cound not find template: "+templateName)