code: private static Key getEgParentKey(Type type, Key jobKey) {
      switch (type) {
        case RUN:
          return null;
        case FINALIZE:
          if (null == jobKey) {
            throw new IllegalArgumentException("jobKey is null");
          }
          break;
      }
      return jobKey;
    }
docs: Returns the entity group parent of a Barrier of the specified type.
  <p>
  According to our <a href="http://goto/java-pipeline-model">transactional
  model</a>: If B is the finalize barrier of a Job J, then the entity group
  parent of B is J. Run barriers do not have an entity group parent.