def METHOD_NAME(y_true, y_pred, loss, target_localization_loss):
    localization_loss = loss.localization(y_true, y_pred)
    localization_loss = np.asarray(localization_loss, dtype='float32')
    assert np.allclose(localization_loss, target_localization_loss)