code: async def rotate(self, source: str, dest: str):
          
          if self.rotator is None:
              # logging issue 18940: A file may not have been created if delay is True.
              if await self.loop.run_in_executor(
                  None, lambda: os.path.exists(source)
              ):
                  await self.loop.run_in_executor(  # type: ignore
                      None, lambda: os.rename(source, dest)
                  )
          else:
              self.rotator(source, dest)
docs: When rotating, rotate the current log.
  
          The default implementation calls the 'rotator' attribute of the
          handler, if it's callable, passing the source and dest arguments to
          it. If the attribute isn't callable (the default is None), the source
          is simply renamed to the destination.
  
          :param source: The source filename. This is normally the base
                         filename, e.g. 'test.log'
          :param dest:   The destination filename. This is normally
                         what the source is rotated to, e.g. 'test.log.1'.