code: public static LuisRuntimeAPI authenticate(String baseUrl, ServiceClientCredentials credentials) {
          String endpointAPI = null;
          try {
              URI uri = new URI(baseUrl);
              endpointAPI = uri.getHost();
          } catch (Exception e) {
              endpointAPI = EndpointAPI.US_WEST.toString();
          }
          return new LuisRuntimeAPIImpl(baseUrl, credentials)
              .withEndpoint(endpointAPI);
      }
docs: Initializes an instance of Language Understanding (LUIS) Runtime API client.
  
  @param baseUrl the base URL of the service
  @param credentials the management credentials for Azure
  @return the Language Understanding (LUIS) Runtime API client