original_docstring: 
          Find stale nodes (i.e. last seen < cur) and clean them.
          
docstring: Find stale nodes  and clean them.
docstring_tokens: Find stale nodes and clean them .
code: async def find_stale_nodes(self, cur):
          """
          Find stale nodes (i.e. last seen < cur) and clean them.
          """
          if self._stale_times is None:
              self._stale_times = []
          self._stale_times.append(cur)
          if self._stale_times[0] > cur - self.max_age:
              return
          if len(self._stale_times) < 5:
              return
          cut = self._stale_times.pop(0)
  
          dropped = []
          for node in self._nodes.values():
              if node.seen < cut:
                  dropped.append(node)
          names = set()
          for node in dropped:
              names.add(node.name)
              del self._nodes[node.name]
          if names:
              await self.state.kill_stale_nodes(names)
code_tokens: async def find_stale_nodes ( self , cur ) : if self . _stale_times is None : self . _stale_times = [ ] self . _stale_times . append ( cur ) if self . _stale_times [ 0 ] > cur - self . max_age : return if len ( self . _stale_times ) < 5 : return cut = self . _stale_times . pop ( 0 ) dropped = [ ] for node in self . _nodes . values ( ) : if node . seen < cut : dropped . append ( node ) names = set ( ) for node in dropped : names . add ( node . name ) del self . _nodes [ node . name ] if names : await self . state . kill_stale_nodes ( names )
short_docstring: Find stale nodes (i.e.
short_docstring_tokens: Find stale nodes ( i . e .
comment: """
          Find stale nodes (i.e. last seen < cur) and clean them.
          """