def GetSubnetRegion():
    "Gets region from global properties/args that should be used for subnet arg.\n\n  Returns:\n    str, region\n  Raises:\n    SubnetException: if region couldn't be inferred.\n  "
    if properties.VALUES.compute.zone.Get():
        return utils.ZoneNameToRegionName(properties.VALUES.compute.zone.Get())
    elif properties.VALUES.compute.region.Get():
        return properties.VALUES.compute.region.Get()
    raise SubnetException('Region or zone should be specified.')
Gets region from global properties/args that should be used for subnet arg.

Returns:
  str, region
Raises:
  SubnetException: if region couldn't be inferred.
def GetSubnetRegion():
    "Gets region from global properties/args that should be used for subnet arg.\n\n  Returns:\n    str, region\n  Raises:\n    SubnetException: if region couldn't be inferred.\n  "
    if properties.VALUES.compute.zone.Get():
        return utils.ZoneNameToRegionName(properties.VALUES.compute.zone.Get())
    elif properties.VALUES.compute.region.Get():
        return properties.VALUES.compute.region.Get()
    raise SubnetException('Region or zone should be specified.')