def _get_sample_prob(self, dataset_lens):
        """
        Get smoothed sampling porbability by languages. This helps low resource
        languages by upsampling them.
        """
        prob = dataset_lens / dataset_lens.sum()
        smoothed_prob = prob ** self.args.multilang_sampling_alpha
        smoothed_prob = smoothed_prob / smoothed_prob.sum()
        return smoothed_prob

        Get smoothed sampling porbability by languages. This helps low resource
        languages by upsampling them.
        
understand_icl/fairseq/fairseq/tasks/multilingual_language_modeling.py