code: function isActive(vertex, instance) {
      return vertex.parent ? isActive(vertex.parent.parent, instance) && instance.getLastKnownState(vertex.parent) === vertex : true;
  }
docs: Determines if a [[Vertex]] is currently active for a given state machine instance; i.e. that it has been entered but not yet exited.
  @param vertex The [[Vertex]] to test.
  @param instance The state machine instance.
   @internal