class_docstr: Duck-typed version of PyG's GraphStore and FeatureStore.
class_docstr_tok: ["Duck-typed","version","of","PyG","'s","GraphStore","and","FeatureStore","."]
docstr: Given a tensor of nodes of interest, this
  method a single dictionary, noi_index.
  
  noi_index is the original vertex ids grouped by vertex type.
  
  Example Input: [5, 2, 1, 10, 11, 8]
  Output: {'red_vertex': [5, 1, 8], 'blue_vertex': [2], 'green_vertex': [10, 11]}
docstr_tok: ["Given","a","tensor","of","nodes","of","interest",",","this","method","a","single","dictionary",",","noi_index",".","noi_index","is","the","original","vertex","ids","grouped","by","vertex","type",".","Example","Input",":","[","5",",","2",",","1",",","10",",","11",",","8","]","Output",":","{","'red_vertex","'",":","[","5",",","1",",","8","]",",","'blue_vertex","'",":","[","2","]",",","'green_vertex","'",":","[","10",",","11","]","}"]
code: def _get_vertex_groups_from_sample(
      self, nodes_of_interest: TensorType, is_sorted: bool = False
  ) -> Dict[str, torch.Tensor]:
      """
      Given a tensor of nodes of interest, this
      method a single dictionary, noi_index.
  
      noi_index is the original vertex ids grouped by vertex type.
  
      Example Input: [5, 2, 1, 10, 11, 8]
      Output: {'red_vertex': [5, 1, 8], 'blue_vertex': [2], 'green_vertex': [10, 11]}
  
      """
  
      noi_index = {}
  
      vtypes = cudf.Series(self.__vertex_type_offsets["type"])
      if len(vtypes) == 1:
          noi_index[vtypes.iloc[0]] = nodes_of_interest
      else:
          noi_type_indices = torch.searchsorted(
              torch.as_tensor(
                  self.__vertex_type_offsets["stop"], device="cuda"
              ),
              nodes_of_interest,
          )
  
          noi_types = vtypes.iloc[
              cupy.asarray(noi_type_indices)
          ].reset_index(drop=True)
          noi_starts = self.__vertex_type_offsets["start"][
              noi_type_indices
          ]
  
          noi_types = (
              cudf.Series(noi_types, name="t").groupby("t").groups
          )
  
          for type_name, ix in noi_types.items():
              # store the renumbering for this vertex type
              # renumbered vertex id is the index of the old id
              ix = torch.as_tensor(ix, device="cuda")
              # subtract off the offsets
              noi_index[type_name] = (
                  nodes_of_interest[ix] - noi_starts[ix]
              )
  
      return noi_index
  
imports: from typing import Optional, Tuple, Any, Union, List, Dict
  from enum import Enum, auto
  from dataclasses import dataclass
  from collections import defaultdict
  from itertools import chain
  from functools import cached_property
  import numpy
  import cupy
  import pandas
  import cudf
  import cugraph
  import warnings
  import dask.array
  import dask.dataframe
  import dask.distributed
  import dask_cudf
  from cugraph.utilities.utils import import_optional, MissingModule
label_desc: Use image node_id 21 for calling the CuGraphStore obj's underlying member method code with example usage: obj._get_vertex_groups_from_sample(nodes_of_interest, is_sorted) and returns: noi_index