code: public static Path getWriterOutputDir(State state, int numBranches, int branchId) {
      String writerOutputDirKey =
          ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.WRITER_OUTPUT_DIR, numBranches, branchId);
      Preconditions.checkArgument(state.contains(writerOutputDirKey), "Missing required property " + writerOutputDirKey);
  
      return new Path(state.getProp(writerOutputDirKey), WriterUtils.getWriterFilePath(state, numBranches, branchId));
    }
docs: Get the {@link Path} corresponding the to the directory a given {@link org.apache.gobblin.writer.DataWriter} should be writing
  its output data. The output data directory is determined by combining the
  {@link ConfigurationKeys#WRITER_OUTPUT_DIR} and the {@link ConfigurationKeys#WRITER_FILE_PATH}.
  @param state is the {@link State} corresponding to a specific {@link org.apache.gobblin.writer.DataWriter}.
  @param numBranches is the total number of branches for the given {@link State}.
  @param branchId is the id for the specific branch that the {@link org.apache.gobblin.writer.DataWriter} will write to.
  @return a {@link Path} specifying the directory where the {@link org.apache.gobblin.writer.DataWriter} will write to.