Returns provided zone name.
337337
private function getZoneName(Zone $zone, LayoutTypeInterface $layoutType): string
    {
        if ($layoutType->hasZone($zone->getIdentifier())) {
            return $layoutType->getZone($zone->getIdentifier())->getName();
        }

        return $zone->getIdentifier();
    }
964535
def get_zoneID(self, headers, zone):
        """"""
        zoneIDurl = self.BASE_URL + '?name=' + zone
        zoneIDrequest = requests.get(zoneIDurl, headers=headers)
        zoneID = zoneIDrequest.json()['result'][0]['id']
        return zoneID
477908
def _get_zone_id(self):
        
        if not self.service.exists():
            logging.warning("Service does not yet exist.")

        return self.service.settings.data['zone']['http-header-value']
1242189
def get_zone_names(self):
        
        zone_names = []
        for zone in self.get_zones():
            zone_names.append(zone['name'])

        return zone_names
676353
def _find_zone_by_id(self, zone_id):
        """"""
        if not self.zones:
            return None

        zone = list(filter(
            lambda zone: zone.id == zone_id, self.zones))

        return zone[0] if zone else None
1105591
def get_zones(region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    return [z.name for z in conn.get_all_zones()]
1108149
def get_cached_zone_variable(self, zone_id, variable, default=None):
        

        try:
            return self._retrieve_cached_zone_variable(zone_id, variable)
        except UncachedVariable:
            return default
445343
private String formatExemplarLocation(TimeZone tz) {
        String location = getTimeZoneNames().getExemplarLocationName(ZoneMeta.getCanonicalCLDRID(tz));
        if (location == null) {
            // Use "unknown" location
            location = getTimeZoneNames().getExemplarLocationName(UNKNOWN_ZONE_ID);
            if (location == null) {
                // last resort
                location = UNKNOWN_LOCATION;
            }
        }
        return location;
    }
422431
private static synchronized String[] getZoneIDs() {
        if (ZONEIDS == null) {
            try {
                UResourceBundle top = UResourceBundle.getBundleInstance(
                        ICUData.ICU_BASE_NAME, ZONEINFORESNAME, ICUResourceBundle.ICU_DATA_CLASS_LOADER);
                ZONEIDS = top.getStringArray(kNAMES);
            } catch (MissingResourceException ex) {
                // throw away..
            }
        }
        if (ZONEIDS == null) {
            ZONEIDS = new String[0];
        }
        return ZONEIDS;
    }
331833
public com.google.protobuf.ByteString
      getVmZoneNameBytes() {
    java.lang.Object ref = vmZoneName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      vmZoneName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
95907
def get_zone(self, zone_id, records=True):
        
        mask = None
        if records:
            mask = 'resourceRecords'
        return self.service.getObject(id=zone_id, mask=mask)
1001793
def read_name(self):
        """"""
        result = ''
        off = self.offset
        next = -1
        first = off

        while 1:
            len = ord(self.data[off])
            off += 1
            if len == 0:
                break
            t = len & 0xC0
            if t == 0x00:
                result = ''.join((result, self.read_utf(off, len) + '.'))
                off += len
            elif t == 0xC0:
                if next < 0:
                    next = off + 1
                off = ((len & 0x3F) << 8) | ord(self.data[off])
                if off >= first:
                    raise Exception(
                            "Bad domain name (circular) at " + str(off))
                first = off
            else:
                raise Exception("Bad domain name at " + str(off))

        if next >= 0:
            self.offset = next
        else:
            self.offset = off

        return result
1171795
def get_localzone():
    """"""
    global _cache_tz
    if _cache_tz is None:
        _cache_tz = pytz.timezone(get_localzone_name())

    utils.assert_tz_offset(_cache_tz)
    return _cache_tz
899506
def get_modes(self, zone):
        """"""
        self._populate_full_data()
        device = self._get_device(zone)
        return device['thermostat']['allowedModes']
1150218
def default(self):
        
        if ZONE_NAME:
            log.info("Getting or creating default environment for zone with name '{0}'".format(DEFAULT_ENV_NAME()))
            zone_id = self.organization.zones[ZONE_NAME].id
            return self.organization.get_or_create_environment(name=DEFAULT_ENV_NAME(), zone=zone_id)

        def_envs = [env_j["id"] for env_j in self.json() if env_j["isDefault"]]

        if len(def_envs) > 1:
            log.warning('Found more than one default environment. Picking last.')
            return self[def_envs[-1]]
        elif len(def_envs) == 1:
            return self[def_envs[0]]
        raise exceptions.NotFoundError('Unable to get default environment')
299326
@Override
    public String getExemplarLocationName(String tzID) {
        if (tzID == null || tzID.length() == 0) {
            return null;
        }
        String locName = loadTimeZoneNames(tzID).getName(NameType.EXEMPLAR_LOCATION);
        return locName;
    }
582507
def get_zone():
    '''
    
    '''
    cmd = ['tzutil', '/g']
    res = __salt__['cmd.run_all'](cmd, python_shell=False)
    if res['retcode'] or not res['stdout']:
        raise CommandExecutionError('tzutil encountered an error getting '
                                    'timezone',
                                    info=res)
    return mapper.get_unix(res['stdout'].lower(), 'Unknown')