parameters: (self, p, q, limit)
return_statement: return self.__uf.find_set(p, snap_id) == self.__uf.find_set(q, snap_id)
docstring: :type p: int
          :type q: int
          :type limit: int
          :rtype: bool
docstring_summary: :type p: int
          :type q: int
          :type limit: int
          :rtype: bool
docstring_tokens: : type p : int : type q : int : type limit : int : rtype : bool
function: def query(self, p, q, limit):
          """
          :type p: int
          :type q: int
          :type limit: int
          :rtype: bool
          """
          snap_id = bisect.bisect_left(self.__weights, limit)-1
          if snap_id == -1:
              return False
          return self.__uf.find_set(p, snap_id) == self.__uf.find_set(q, snap_id)
function_tokens: def query ( self , p , q , limit ) : snap_id = bisect . bisect_left ( self . __weights , limit ) - 1 if snap_id == - 1 : return False return self . __uf . find_set ( p , snap_id ) == self . __uf . find_set ( q , snap_id )