code: def _record_last_active(self, host):
          
          if host in self.hosts:  # this check is for when user passes a host at request time
              # Keep this thread safe: set hosts atomically and update it before the timestamp
              self.hosts = [host] + [h for h in self.hosts if h != host]
              self._last_time_recorded_active = time.time()
docs: Put host first in our host list, so we try it first next time
  
          The implementation of get_active_namenode relies on this reordering.