code: def get_best_threshlod(self, score, ans):
      res = np.concatenate(
          [ans.reshape(-1, 1), score.reshape(-1, 1)], axis=-1
      )
      order = np.argsort(score)
      res = res[order]
  
      total_all = (float)(len(score))
      total_current = 0.0
      total_true = np.sum(ans)
      total_false = total_all - total_true
  
      res_mx = 0.0
      threshlod = None
      for index, [ans, score] in enumerate(res):
          if ans == 1:
              total_current += 1.0
          res_current = (
              2 * total_current + total_false - index - 1
          ) / total_all
          if res_current > res_mx:
              res_mx = res_current
              threshlod = score
      return threshlod, res_mx
  
imports: import torch
  import torch.nn
  from torch.autograd import Variable
  import torch.optim
  import os
  import time
  import sys
  import datetime
  import ctypes
  import json
  import numpy
  from sklearn.metrics import roc_auc_score
  import copy
  from tqdm import tqdm
label_desc: Use image node_id 8 for calling the Tester obj's underlying member method code with example usage: obj.get_best_threshlod(score, ans) and returns: threshlod,  res_mx