nodes: 0, module; 1, function_definition; 2, function_name:_find; 3, parameters; 4, block; 5, identifier:self; 6, identifier:rpcmethod; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, if_statement; 11, expression_statement; 12, expression_statement; 13, for_statement; 14, expression_statement; 15, return_statement; 16, comment:"""
          Get either a value or list of nodes.
  
          Args:
              rpcmethod: The protocol's callfindValue or call_find_node.
  
          The process:
            1. calls find_* to current ALPHA nearest not already queried nodes,
               adding results to current nearest list of k nodes.
            2. current nearest list needs to keep track of who has been queried
               already sort by nearest, keep KSIZE
            3. if list is same as last time, next call should be to everyone not
               yet queried
            4. repeat, unless nearest list has all been queried, then ur done
          """; 17, call; 18, assignment; 19, comparison_operator:self.nearest.get_ids() == self.last_ids_crawled; 20, block; 21, assignment; 22, assignment; 23, identifier:peer; 24, subscript; 25, block; 26, assignment; 27, await; 28, attribute; 29, argument_list; 30, identifier:count; 31, attribute; 32, call; 33, attribute; 34, expression_statement; 35, attribute; 36, call; 37, identifier:dicts; 38, dictionary; 39, call; 40, slice; 41, expression_statement; 42, expression_statement; 43, identifier:found; 44, await; 45, call; 46, identifier:log; 47, identifier:info; 48, string:"crawling network with nearest: %s"; 49, call; 50, identifier:self; 51, identifier:alpha; 52, attribute; 53, argument_list; 54, identifier:self; 55, identifier:last_ids_crawled; 56, assignment; 57, identifier:self; 58, identifier:last_ids_crawled; 59, attribute; 60, argument_list; 61, attribute; 62, argument_list; 63, identifier:count; 64, assignment; 65, call; 66, call; 67, attribute; 68, argument_list; 69, identifier:str; 70, argument_list; 71, attribute; 72, identifier:get_ids; 73, identifier:count; 74, call; 75, attribute; 76, identifier:get_ids; 77, attribute; 78, identifier:get_uncontacted; 79, subscript; 80, call; 81, attribute; 82, argument_list; 83, identifier:gather_dict; 84, argument_list; 85, identifier:self; 86, identifier:_nodes_found; 87, identifier:found; 88, call; 89, identifier:self; 90, identifier:nearest; 91, identifier:len; 92, argument_list; 93, identifier:self; 94, identifier:nearest; 95, identifier:self; 96, identifier:nearest; 97, identifier:dicts; 98, attribute; 99, identifier:rpcmethod; 100, argument_list; 101, attribute; 102, identifier:mark_contacted; 103, identifier:peer; 104, identifier:dicts; 105, identifier:tuple; 106, argument_list; 107, attribute; 108, identifier:peer; 109, identifier:id; 110, identifier:peer; 111, attribute; 112, identifier:self; 113, identifier:nearest; 114, attribute; 115, identifier:self; 116, identifier:nearest; 117, identifier:self; 118, identifier:node; 119, identifier:self; 120, identifier:nearest
code: async def _find(self, rpcmethod):
          """
          Get either a value or list of nodes.
  
          Args:
              rpcmethod: The protocol's callfindValue or call_find_node.
  
          The process:
            1. calls find_* to current ALPHA nearest not already queried nodes,
               adding results to current nearest list of k nodes.
            2. current nearest list needs to keep track of who has been queried
               already sort by nearest, keep KSIZE
            3. if list is same as last time, next call should be to everyone not
               yet queried
            4. repeat, unless nearest list has all been queried, then ur done
          """
          log.info("crawling network with nearest: %s", str(tuple(self.nearest)))
          count = self.alpha
          if self.nearest.get_ids() == self.last_ids_crawled:
              count = len(self.nearest)
          self.last_ids_crawled = self.nearest.get_ids()
  
          dicts = {}
          for peer in self.nearest.get_uncontacted()[:count]:
              dicts[peer.id] = rpcmethod(peer, self.node)
              self.nearest.mark_contacted(peer)
          found = await gather_dict(dicts)
          return await self._nodes_found(found)