<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def trust_notebook(self, path):
 """Trust the current notebook"""

        if path.endswith('.ipynb') or path not in self.paired_notebooks:
            super(TextFileContentsManager, self).trust_notebook(path)
            return

        fmt, formats = self.paired_notebooks[path]
        for alt_path, alt_fmt in paired_paths(path, fmt, formats):
            if alt_fmt['extension'] == '.ipynb':
                super(TextFileContentsManager, self).trust_notebook(alt_path)