code: private boolean possiblySuspendOrResumeSupervisorInternal(String id, boolean suspend)
    {
      Pair<Supervisor, SupervisorSpec> pair = supervisors.get(id);
      if (pair == null || pair.rhs.isSuspended() == suspend) {
        return false;
      }
  
      SupervisorSpec nextState = suspend ? pair.rhs.createSuspendedSpec() : pair.rhs.createRunningSpec();
      possiblyStopAndRemoveSupervisorInternal(nextState.getId(), false);
      return createAndStartSupervisorInternal(nextState, true);
    }
docs: Suspend or resume a supervisor with a given id.
  <p/>
  Caller should have acquired [lock] before invoking this method to avoid contention with other threads that may be
  starting, stopping, suspending and resuming supervisors.
  
  @return true if a supervisor was suspended or resumed, false if there was no supervisor with this id
  or suspend a suspended supervisor or resume a running supervisor