code: def rgfromid(idstr):
      '''get resource group name from the id string'''
      rgidx = idstr.find('resourceGroups/')
      providx = idstr.find('/providers/')
      return idstr[rgidx + 15:providxf rgfromid(idstr):
      '''get resource group name from the id string'''
      rgidx = idstr.find('resourceGroups/')
      providx = idstr.find('/providers/')
      return idstr[rgidx + 15:providx]
docs: get resource group name from the id string