nodes: 0, module; 1, function_definition; 2, function_name:view; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, dictionary_splat_pattern; 11, expression_statement; 12, expression_statement; 13, identifier:sort; 14, None; 15, identifier:purge; 16, False; 17, identifier:done; 18, None; 19, identifier:undone; 20, None; 21, identifier:kwargs; 22, comment:"""Handles the 'v' command.
  
          :sort: Sort pattern.
          :purge: Whether to purge items marked as 'done'.
          :done: Done pattern.
          :undone: Not done pattern.
          :kwargs: Additional arguments to pass to the View object.
  
          """; 23, call; 24, identifier:View; 25, argument_list; 26, call; 27, dictionary_splat; 28, attribute; 29, argument_list; 30, identifier:kwargs; 31, attribute; 32, identifier:modify; 33, keyword_argument; 34, keyword_argument; 35, keyword_argument; 36, identifier:self; 37, identifier:model; 38, identifier:sort; 39, call; 40, identifier:purge; 41, identifier:purge; 42, identifier:done; 43, call; 44, attribute; 45, argument_list; 46, attribute; 47, argument_list; 48, identifier:self; 49, identifier:_getPattern; 50, identifier:sort; 51, identifier:self; 52, identifier:_getDone; 53, identifier:done; 54, identifier:undone
code: def view(self, sort=None, purge=False, done=None, undone=None, **kwargs):
          """Handles the 'v' command.
  
          :sort: Sort pattern.
          :purge: Whether to purge items marked as 'done'.
          :done: Done pattern.
          :undone: Not done pattern.
          :kwargs: Additional arguments to pass to the View object.
  
          """
          View(self.model.modify(
              sort=self._getPattern(sort),
              purge=purge,
              done=self._getDone(done, undone)
          ), **kwargs)