code: public String getGenericLocationName(String canonicalTzID) {
          if (canonicalTzID == null || canonicalTzID.length() == 0) {
              return null;
          }
          String name = _genericLocationNamesMap.get(canonicalTzID);
          if (name != null) {
              if (name.length() == 0) {
                  // empty string to indicate the name is not available
                  return null;
              }
              return name;
          }
  
          Output<Boolean> isPrimary = new Output<Boolean>();
          String countryCode = ZoneMeta.getCanonicalCountry(canonicalTzID, isPrimary);
          if (countryCode != null) {
              if (isPrimary.value) {
                  // If this is only the single zone in the country, use the country name
                  String country = getLocaleDisplayNames().regionDisplayName(countryCode);
                  name = formatPattern(Pattern.REGION_FORMAT, country);
              } else {
                  // If there are multiple zones including this in the country,
                  // use the exemplar city name
  
                  // getExemplarLocationName should return non-empty String
                  // if the time zone is associated with a location
                  String city = _tznames.getExemplarLocationName(canonicalTzID);
                  name = formatPattern(Pattern.REGION_FORMAT, city);
              }
          }
  
          if (name == null) {
              _genericLocationNamesMap.putIfAbsent(canonicalTzID.intern(), "");
          } else {
              synchronized (this) {   // we have to sync the name map and the trie
                  canonicalTzID = canonicalTzID.intern();
                  String tmp = _genericLocationNamesMap.putIfAbsent(canonicalTzID, name.intern());
                  if (tmp == null) {
                      // Also put the name info the to trie
                      NameInfo info = new NameInfo(canonicalTzID, GenericNameType.LOCATION);
                      _gnamesTrie.put(name, info);
                  } else {
                      name = tmp;
                  }
              }
          }
          return name;
      }
docs: Returns the generic location name for the given canonical time zone ID.
  
  @param canonicalTzID the canonical time zone ID
  @return the generic location name for the given canonical time zone ID.