<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def linenumber(self, p_todo):
 """ Returns the line number of the todo item. """

        try:
            return self._todos.index(p_todo) + 1
        except ValueError as ex:
            raise InvalidTodoException from ex