code: def triplet_iou_thresh(pred_triplet, gt_triplet, iou_thresh=0.5):
      sub_iou = iou(gt_triplet[5:9], pred_triplet[5:9])
      if sub_iou >= iou_thresh:
          ob_iou = iou(gt_triplet[9:13], pred_triplet[9:13])
          if ob_iou >= iou_thresh:
              return True
      return False
  
imports: import logging
  import time
  from operator import attrgetter, itemgetter
  import dgl
  import mxnet
  import numpy
  from dgl.nn.mxnet import GraphConv
  from dgl.utils import toindex
  from gluoncv.data.batchify import Pad
  from gluoncv.model_zoo import get_model
  from mxnet import gluon, nd
  from mxnet.gluon import nn
label_desc: Use image node_id 3 for calling a global function with example usage: triplet_iou_thresh(pred_triplet, gt_triplet, iou_thresh) and returns: False, True