<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save_notebook(self, body):
 """Save notebook depending on user provided output path."""

        directory = os.path.dirname(self.output_path)
        full_path = os.path.join(directory, self.notebook_name)
        try:
            with open(full_path, 'w') as fh:
                fh.write(json.dumps(body, indent=2))
        except ValueError:
            print('ERROR: Could not save executed notebook to path: ' +
                  self.output_path +
                  ' -- Please provide a valid absolute path.')