class_docstr: Samples mini-batches randomly but in a grouped manner.
  
  This means that the items from the different groups are always sampled together.
  This is an abstract class. Implement the :py:meth:`~get_groups` method which creates groups to be sampled from.
docstr: Create the groups which can be sampled.
  
  Args:
      sampler (Sampler): will have attribute data_source which is of type TimeSeriesDataSet.
  
  Returns:
      dict-like: dictionary-like object with data_source.index as values and group names as keys
docstr_tok: ["Create","the","groups","which","can","be","sampled",".","Args",":","sampler","(","Sampler",")",":","will","have","attribute","data_source","which","is","of","type","TimeSeriesDataSet",".","Returns",":","dict-like",":","dictionary-like","object","with","data_source.index","as","values","and","group","names","as","keys"]
code: def get_groups(self, sampler: Sampler):
      """
      Create the groups which can be sampled.
  
      Args:
          sampler (Sampler): will have attribute data_source which is of type TimeSeriesDataSet.
  
      Returns:
          dict-like: dictionary-like object with data_source.index as values and group names as keys
      """
      raise NotImplementedError()
  
file_path: pytorch-forecasting/pytorch_forecasting/data/samplers.py
imports: import warnings
  import numpy
  import pandas
  from sklearn.utils import shuffle
  import torch
  from torch.utils.data.sampler import Sampler
label_desc: Use image node_id 2 for calling the GroupedSampler obj's underlying member method code with example usage: obj.get_groups(sampler) without return types