code: def add(self, text, checked=False, sort=None):
          
          if self.parent is None:
              raise exception.InvalidException('Item has no parent')
          node = self.parent.add(text, checked, sort)
          self.indent(node)
          return node
docs: Add a new sub item to the list. This item must already be attached to a list.
  
          Args:
              text (str): The text.
              checked (bool): Whether this item is checked.
              sort (int): Item id for sorting.