code: def matches_sample(output, target, threshold, is_correct, actual_output):
          
          return (bool(output > threshold) == bool(target)) == is_correct and actual_output == bool(output > threshold)
docs: Check if a sample with the given network output, target output, and threshold
          is the classification (is_correct, actual_output) like true positive or false negative