def METHOD_NAME():
    def loss(output, output_len, targets, targets_len):
        output_trans = output.permute(1, 0, 2) # needed by the CTCLoss
        loss = F.ctc_loss(output_trans, targets, output_len, targets_len, reduction='none', zero_infinity=True)
        loss /= output_len
        loss = loss.mean()
        return loss
    return loss