def METHOD_NAME(self, cfg):
    # shot sampler
    if cfg is not None:
        self.sampling_method = cfg.sampling_method.name
        sampler_args = copy.deepcopy(
            cfg.sampling_method.params.get(self.sampling_method, {}))
        if self.sampling_method == 'instance':
            self.shot_sampler = sampler.InstanceShotSampler()
        elif self.sampling_method == 'temporal':
            self.shot_sampler = sampler.TemporalShotSampler(**sampler_args)
        elif self.sampling_method == 'shotcol':
            self.shot_sampler = sampler.SequenceShotSampler(**sampler_args)
        elif self.sampling_method == 'bassl':
            self.shot_sampler = sampler.SequenceShotSampler(**sampler_args)
        elif self.sampling_method == 'bassl+shotcol':
            self.shot_sampler = sampler.SequenceShotSampler(**sampler_args)
        elif self.sampling_method == 'sbd':
            self.shot_sampler = sampler.NeighborShotSampler(**sampler_args)
        else:
            raise NotImplementedError
    else:
        self.shot_sampler = sampler.NeighborShotSampler()