code: public Optional<SingularityTaskState> getTaskState(String requestId, String runId) {
      final Function<String, String> requestUri = (host) -> String.format(TRACK_BY_RUN_ID_FORMAT, getApiBase(host), requestId, runId);
      return getSingle(requestUri, "track by task id", String.format("%s-%s", requestId, runId), SingularityTaskState.class);
    }
docs: Get the current state of a task by its run IDg
  
  @param requestId
  The request ID to search for the specified runId
  @param runId
  The run ID to search for
  
  @return
  A {@link SingularityTaskState} if the task was found among pending, active or inactive tasks