code: def auth_with_token(token, tenant_id=None, tenant_name=None, region=None):
      
      global regions, services
      identity.auth_with_token(token, tenant_id=tenant_id,
              tenant_name=tenant_name)
      regions = tuple(identity.regions)
      services = tuple(identity.services.keys())
      connect_to_services(region=region)
docs: If you already have a valid token and either a tenant ID or name, you can
      call this to configure the identity and available services.