code: async def close_websession(self):
          
          # We do not close the web session if it was provided.
          if self._supplied_websession or self._websession is None:
              return
  
          _LOGGER.debug('Closing connections')
          # Need to set _websession to none first to prevent any other task
          # from closing it as well.
          temp_websession = self._websession
          self._websession = None
          await temp_websession.close()
          await asyncio.sleep(0)
          _LOGGER.debug('Connections closed')
docs: Close web session if not already closed and created by us.