code: public static String getTemporaryPathRoot(Configuration conf, @Nullable JobID jobId)
        throws IOException {
      // Try using the temporary gcs path.
      String pathRoot = conf.get(BigQueryConfiguration.TEMP_GCS_PATH_KEY);
  
      if (Strings.isNullOrEmpty(pathRoot)) {
        checkNotNull(jobId, "jobId is required if '%s' is not set", TEMP_GCS_PATH_KEY);
        logger.atInfo().log(
            "Fetching key '%s' since '%s' isn't set explicitly.", GCS_BUCKET_KEY, TEMP_GCS_PATH_KEY);
  
        String gcsBucket = conf.get(GCS_BUCKET_KEY);
        if (Strings.isNullOrEmpty(gcsBucket)) {
          throw new IOException("Must supply a value for configuration setting: " + GCS_BUCKET_KEY);
        }
  
        pathRoot = String.format("gs://%s/hadoop/tmp/bigquery/%s", gcsBucket, jobId);
      }
  
      logger.atInfo().log("Using working path: '%s'", pathRoot);
      Path workingPath = new Path(pathRoot);
  
      FileSystem fs = workingPath.getFileSystem(conf);
      Preconditions.checkState(
          fs instanceof GoogleHadoopFileSystemBase,
          "Export FS must derive from GoogleHadoopFileSystemBase.");
      return pathRoot;
    }
docs: Resolves to provided {@link #TEMP_GCS_PATH_KEY} or fallbacks to a temporary path based on
  {@link #GCS_BUCKET_KEY} and {@code jobId}.
  
  @param conf the configuration to fetch the keys from.
  @param jobId the ID of the job requesting a working path. Optional (could be {@code null}) if
  {@link #TEMP_GCS_PATH_KEY} is provided.
  @return the temporary directory path.
  @throws IOException if the file system of the derived working path isn't a derivative of
  GoogleHadoopFileSystemBase.