original_docstring: 
          Perform offline diffusion search for a sequence of data point ids.
  
          Args:
              ids: List of ids to use as search queries.
              agg: If True, will aggregate queries and find their combined neighbors.
  
          Returns:
              Diffusion scores and ids
  
          
docstring: Perform offline diffusion search for a sequence of data point ids.
docstring_tokens: Perform offline diffusion search for a sequence of data point ids .
code: def offline_search(self, ids, agg=False):
          """
          Perform offline diffusion search for a sequence of data point ids.
  
          Args:
              ids: List of ids to use as search queries.
              agg: If True, will aggregate queries and find their combined neighbors.
  
          Returns:
              Diffusion scores and ids
  
          """
          ids = _conform_indices(ids, ndim=1)
          c_q = self._initialize_offline(ids, agg=agg)
          f_opt = self._diffuse_offline(c_q)
          if (
              agg
              or self.truncation_size is None
              or self.truncation_size >= self.l_inv_.shape[0]
          ):
              f_opt, ranks = _sort2d(f_opt)
              f_opt, ranks = _remove_query_ids_2d(f_opt, ranks, ids)
          else:
              f_opt, ranks = _sort2d_trunc(f_opt, self.truncation_size)
              f_opt, ranks = zip(
                  *[
                      _remove_query_ids_1d(f_opt_i, ranks_i, ids_i)
                      for f_opt_i, ranks_i, ids_i in zip(f_opt, ranks, ids)
                  ]
              )
              f_opt, ranks = np.stack(f_opt), np.stack(ranks)
  
          return f_opt, ranks
code_tokens: def offline_search ( self , ids , agg = False ) : ids = _conform_indices ( ids , ndim = 1 ) c_q = self . _initialize_offline ( ids , agg = agg ) f_opt = self . _diffuse_offline ( c_q ) if ( agg or self . truncation_size is None or self . truncation_size >= self . l_inv_ . shape [ 0 ] ) : f_opt , ranks = _sort2d ( f_opt ) f_opt , ranks = _remove_query_ids_2d ( f_opt , ranks , ids ) else : f_opt , ranks = _sort2d_trunc ( f_opt , self . truncation_size ) f_opt , ranks = zip ( * [ _remove_query_ids_1d ( f_opt_i , ranks_i , ids_i ) for f_opt_i , ranks_i , ids_i in zip ( f_opt , ranks , ids ) ] ) f_opt , ranks = np . stack ( f_opt ) , np . stack ( ranks ) return f_opt , ranks
short_docstring: Perform offline diffusion search for a sequence of data point ids.
short_docstring_tokens: Perform offline diffusion search for a sequence of data point ids .
comment: """
          Perform offline diffusion search for a sequence of data point ids.
  
          Args:
              ids: List of ids to use as search queries.
              agg: If True, will aggregate queries and find their combined neighbors.
  
          Returns:
              Diffusion scores and ids
  
          """