code: def set_driver(self, driver=None):
          
          if driver is None:
              self.manual_driver = None
          elif isinstance(driver, str):
              if driver not in driver_map:
                  raise TypeError('no such driver:' + repr(driver))
              self.manual_driver = driver_map[driver]
          elif isinstance(driver, Driver):
              self.manual_driver = driver
          else:
              raise TypeError('unsupported argument type:' + type(driver))
docs: Defines the driver that is used to recognize prompts and implement
          behavior depending on the remote system.
          The driver argument may be an instance of a protocols.drivers.Driver
          subclass, a known driver name (string), or None.
          If the driver argument is None, the adapter automatically chooses
          a driver using the guess_os() function.
  
          :type  driver: Driver()|str
          :param driver: The pattern that, when matched, causes an error.