code: func (cgroup *CgroupResource) ApplyTransition(nextState resourcestatus.ResourceStatus) error {
  	transitionFunc, ok := cgroup.statusToTransitions[nextState]
  	if !ok {
  		seelog.Errorf("Cgroup Resource [%s]: unsupported desired state transition [%s]: %s",
  			cgroup.taskARN, cgroup.GetName(), cgroup.StatusString(nextState))
  		return errors.Errorf("resource [%s]: transition to %s impossible", cgroup.GetName(),
  			cgroup.StatusString(nextState))
  	}
  	return transitionFunc()
  }
docs: // ApplyTransition calls the function required to move to the specified status