<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove(self, expr):
 """Remove a provided expression from its list of contents. :param Union[TexExpr,str] expr: Content to add :return: index of the expression removed :rtype: int 0 TexExpr('textbf', []) """

        self._assert_supports_contents()
        index = self._contents.index(expr)
        self._contents.remove(expr)
        return index