ensureTransformed_(statement) {
    if (statement === null) {
      return null;
    }
    let maybeTransformed = this.maybeTransformStatement_(statement);
    return maybeTransformed.type === STATE_MACHINE ?
        maybeTransformed :
        this.statementToStateMachine_(maybeTransformed);
  }
Ensure that a statement has been transformed into a state machine.
@param {ParseTree} statement
@return {StateMachine}