class RadioScenePack extends ScenePack {
  private static final Logger logger = LoggerFactory.getLogger(RadioScenePack.class);

  public RadioScenePack(String name) {
    super(name);
  }

  @Override
  protected void internalApply() {<FILL_FUNCTION_BODY>}

  @Override
  public void add(Transform t) {
    super.add(t);
    checkEnabled(t);
  }

  @Override
  public void insertAfter(Transform t, String phaseName) {
    super.insertAfter(t, phaseName);
    checkEnabled(t);
  }

  @Override
  public void insertBefore(Transform t, String phaseName) {
    super.insertBefore(t, phaseName);
    checkEnabled(t);
  }

  private void checkEnabled(Transform t) {
    Map<String, String> options = PhaseOptions.v().getPhaseOptions(t);
    if (PhaseOptions.getBoolean(options, "enabled")) {
      // Enabling this one will disable all the others
      PhaseOptions.v().setPhaseOption(t, "enabled:true");
    }
  }
}

    LinkedList<Transform> enabled = new LinkedList<Transform>();

    for (Transform t : this) {
      Map<String, String> opts = PhaseOptions.v().getPhaseOptions(t);
      if (PhaseOptions.getBoolean(opts, "enabled")) {
        enabled.add(t);
      }
    }
    if (enabled.isEmpty()) {
      logger.debug("Exactly one phase in the pack " + getPhaseName() + " must be enabled. Currently, none of them are.");
      throw new CompilationDeathException(CompilationDeathException.COMPILATION_ABORTED);
    }
    if (enabled.size() > 1) {
      logger
          .debug("Only one phase in the pack " + getPhaseName() + " may be enabled. The following are enabled currently: ");
      for (Transform t : enabled) {
        logger.debug("  " + t.getPhaseName());
      }
      throw new CompilationDeathException(CompilationDeathException.COMPILATION_ABORTED);
    }
    for (Transform t : enabled) {
      t.apply();
    }
  
<methods>public void <init>(java.lang.String) <variables>