def METHOD_NAME(zone_or_region: str) -> str:
  """Returns the region a zone is in (or "zone_or_region" if it's a region)."""
  if _IsRegion(zone_or_region):
    return zone_or_region
  if IsZone(zone_or_region):
    return zone_or_region[:-2]
  raise ValueError('%s is not a valid Azure zone or region name' %
                   zone_or_region)