<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def log_loss(preds, labels):
 """Logarithmic loss with non-necessarily-binary labels."""

    log_likelihood = np.sum(labels * np.log(preds)) / len(preds)
    return -log_likelihood