def roc_auc_score(y_pred, y_true):
    with tf.name_scope("RocAucScore"):

        pos = tf.boolean_mask(y_pred, tf.cast(y_true, tf.bool))
        neg = tf.boolean_mask(y_pred, ~tf.cast(y_true, tf.bool))

        pos = tf.expand_dims(pos, 0)
        neg = tf.expand_dims(neg, 1)

        # original paper suggests performance is robust to exact parameter choice
        gamma = 0.2
        p     = 3

        difference = tf.zeros_like(pos * neg) + pos - neg - gamma

        masked = tf.boolean_mask(difference, difference < 0.0)

        return tf.reduce_sum(tf.pow(-masked, p))
testing if include_handles() method is working properly
dataset/ETHPy150Open tflearn/tflearn/tflearn/objectives.py/roc_auc_score--crossover with--dataset/ETHPy150Open eoyilmaz/anima/tests/previs/test_shot_extension.py/ShotExtensionTestCase.test_include_handles_is_working_properly