code: def _Parse(self, template):
      
  
      if not template:
        raise TextFSMTemplateError('Null template.')
  
      # Parse header with Variables.
      self._ParseFSMVariables(template)
  
      # Parse States.
      while self._ParseFSMState(template):
        pass
  
      # Validate destination states.
      self._ValidateFSM()
docs: Parses template file for FSM structure.
  
      Args:
        template: Valid template file.
  
      Raises:
        TextFSMTemplateError: If template file syntax is invalid.