code: def rename_file(self, old_path, new_path):
          
          if old_path not in self.paired_notebooks:
              try:
                  # we do not know yet if this is a paired notebook (#190)
                  # -> to get this information we open the notebook
                  self.get(old_path, content=True)
              except Exception:
                  pass
  
          if old_path not in self.paired_notebooks:
              super(TextFileContentsManager, self).rename_file(old_path, new_path)
              return
  
          fmt, formats = self.paired_notebooks.get(old_path)
          old_alt_paths = paired_paths(old_path, fmt, formats)
  
          # Is the new file name consistent with suffix?
          try:
              new_base = base_path(new_path, fmt)
          except Exception as err:
              raise HTTPError(400, str(err))
  
          for old_alt_path, alt_fmt in old_alt_paths:
              new_alt_path = full_path(new_base, alt_fmt)
              if self.exists(old_alt_path):
                  super(TextFileContentsManager, self).rename_file(old_alt_path, new_alt_path)
  
          self.drop_paired_notebook(old_path)
          self.update_paired_notebooks(new_path, fmt, formats)
docs: Rename the current notebook, as well as its alternative representations