code: def close(self):
          
          try:
              logger.debug('Closing ResourceManager (session: %s)', self.session)
              # Cleanly close all resources when closing the manager.
              for resource in self._created_resources:
                  resource.close()
              self.visalib.close(self.session)
              self.session = None
              self.visalib.resource_manager = None
          except errors.InvalidSession:
              pass
docs: Close the resource manager session.