code: def save_notebook(self, body):
          
          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.')
docs: Save notebook depending on user provided output path.