nodes: 0, module; 1, function_definition; 2, function_name:add; 3, parameters; 4, block; 5, identifier:self; 6, identifier:text; 7, default_parameter; 8, default_parameter; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, expression_statement; 13, if_statement; 14, expression_statement; 15, expression_statement; 16, return_statement; 17, identifier:checked; 18, False; 19, identifier:sort; 20, None; 21, comment:"""Add a new item to the list.
  
          Args:
              text (str): The text.
              checked (bool): Whether this item is checked.
              sort (int): Item id for sorting.
          """; 22, assignment; 23, assignment; 24, assignment; 25, comparison_operator:sort is not None; 26, block; 27, call; 28, call; 29, identifier:node; 30, identifier:node; 31, call; 32, attribute; 33, identifier:checked; 34, attribute; 35, identifier:text; 36, identifier:sort; 37, None; 38, expression_statement; 39, attribute; 40, argument_list; 41, attribute; 42, argument_list; 43, identifier:ListItem; 44, argument_list; 45, identifier:node; 46, identifier:checked; 47, identifier:node; 48, identifier:text; 49, assignment; 50, identifier:self; 51, identifier:append; 52, identifier:node; 53, True; 54, identifier:self; 55, identifier:touch; 56, True; 57, keyword_argument; 58, keyword_argument; 59, attribute; 60, identifier:sort; 61, identifier:parent_id; 62, attribute; 63, identifier:parent_server_id; 64, attribute; 65, identifier:node; 66, identifier:sort; 67, identifier:self; 68, identifier:id; 69, identifier:self; 70, identifier:server_id
code: def add(self, text, checked=False, sort=None):
          """Add a new item to the list.
  
          Args:
              text (str): The text.
              checked (bool): Whether this item is checked.
              sort (int): Item id for sorting.
          """
          node = ListItem(parent_id=self.id, parent_server_id=self.server_id)
          node.checked = checked
          node.text = text
          if sort is not None:
              node.sort = sort
          self.append(node, True)
          self.touch(True)
          return node