def set_tenant_id_tag(tenant_id, taglist=None):
 new_taglist = []
 if taglist:
  new_taglist = [x for x in taglist if (x['scope'] != TENANT_ID_SCOPE)]
 new_taglist.append(dict(scope=TENANT_ID_SCOPE, tag=tenant_id))
 return new_taglist

def set_tenant_id_tag ( tenant_id , taglist = None ) : new_taglist = [ ] if taglist : new_taglist = [ x for x in taglist if ( x [ 'scope' ] != TENANT_ID_SCOPE ) ] new_taglist . append ( dict ( scope = TENANT_ID_SCOPE , tag = tenant_id ) ) return new_taglist
convenience function to add tenant_id tag to taglist .