code: @Nullable
    @VisibleForTesting
    static Map<String, ?> maybeChooseServiceConfig(
        Map<String, ?> choice, Random random, String hostname) {
      for (Entry<String, ?> entry : choice.entrySet()) {
        Verify.verify(SERVICE_CONFIG_CHOICE_KEYS.contains(entry.getKey()), "Bad key: %s", entry);
      }
  
      List<String> clientLanguages = getClientLanguagesFromChoice(choice);
      if (clientLanguages != null && !clientLanguages.isEmpty()) {
        boolean javaPresent = false;
        for (String lang : clientLanguages) {
          if ("java".equalsIgnoreCase(lang)) {
            javaPresent = true;
            break;
          }
        }
        if (!javaPresent) {
          return null;
        }
      }
      Double percentage = getPercentageFromChoice(choice);
      if (percentage != null) {
        int pct = percentage.intValue();
        Verify.verify(pct >= 0 && pct <= 100, "Bad percentage: %s", percentage);
        if (random.nextInt(100) >= pct) {
          return null;
        }
      }
      List<String> clientHostnames = getHostnamesFromChoice(choice);
      if (clientHostnames != null && !clientHostnames.isEmpty()) {
        boolean hostnamePresent = false;
        for (String clientHostname : clientHostnames) {
          if (clientHostname.equals(hostname)) {
            hostnamePresent = true;
            break;
          }
        }
        if (!hostnamePresent) {
          return null;
        }
      }
      Map<String, ?> sc =
          ServiceConfigUtil.getObject(choice, SERVICE_CONFIG_CHOICE_SERVICE_CONFIG_KEY);
      if (sc == null) {
        throw new VerifyException(String.format(
            "key '%s' missing in '%s'", choice, SERVICE_CONFIG_CHOICE_SERVICE_CONFIG_KEY));
      }
      return sc;
    }
docs: Determines if a given Service Config choice applies, and if so, returns it.
  
  @see <a href="https://github.com/grpc/proposal/blob/master/A2-service-configs-in-dns.md">
  Service Config in DNS</a>
  @param choice The service config choice.
  @return The service config object or {@code null} if this choice does not apply.