def METHOD_NAME(self, model, net_output, sample):
    lprobs = model.get_normalized_probs(net_output, log_probs=True)
    target = model.get_targets(sample, net_output)
    assert self.ignore_prefix_size == 0
    if self.ignore_prefix_size > 0:
        if getattr(lprobs, "batch_first", False):
            lprobs = lprobs[:, self.ignore_prefix_size :, :].contiguous()
            target = target[:, self.ignore_prefix_size :].contiguous()
        else:
            lprobs = lprobs[self.ignore_prefix_size :, :, :].contiguous()
            target = target[self.ignore_prefix_size :, :].contiguous()
    return lprobs, target