code: def scan(self, wait=None):
          
  
          min_scan = self.adapter.get_config('minimum_scan_time', 0.0)
          probe_required = self.adapter.get_config('probe_required', False)
  
          # Figure out how long and if we need to wait before returning our scan results
          wait_time = None
          elapsed = monotonic() - self._start_time
          if elapsed < min_scan:
              wait_time = min_scan - elapsed
  
          # If we need to probe for devices rather than letting them just bubble up, start the probe
          # and then use our min_scan_time to wait for them to arrive via the normal _on_scan event
          if probe_required:
              self._loop.run_coroutine(self.adapter.probe())
              wait_time = min_scan
  
          # If an explicit wait is specified that overrides everything else
          if wait is not None:
              wait_time = wait
  
          if wait_time is not None:
              sleep(wait_time)
  
          to_remove = set()
  
          now = monotonic()
  
          with self._scan_lock:
              for name, value in self._scanned_devices.items():
                  if value['expiration_time'] < now:
                      to_remove.add(name)
  
              for name in to_remove:
                  del self._scanned_devices[name]
  
              devices = sorted(self._scanned_devices.values(), key=lambda x: x['uuid'])
  
          return devices
docs: Return the devices that have been found for this device adapter.
  
          If the adapter indicates that we need to explicitly tell it to probe for devices, probe now.
          By default we return the list of seen devices immediately, however there are two cases where
          we will sleep here for a fixed period of time to let devices show up in our result list:
  
          - If we are probing then we wait for 'minimum_scan_time'
          - If we are told an explicit wait time that overrides everything and we wait that long