code: def satisfy_sample_constraint(
      sampler, sample_bbox, gt_bboxes, satisfy_all=False
  ):
      if sampler[6] == 0 and sampler[7] == 0:
          return True
      satisfied = []
      for i in range(len(gt_bboxes)):
          object_bbox = [
              gt_bboxes[i][0],
              gt_bboxes[i][1],
              gt_bboxes[i][2],
              gt_bboxes[i][3],
          ]
          overlap = jaccard_overlap(sample_bbox, object_bbox)
          if sampler[6] != 0 and overlap < sampler[6]:
              satisfied.append(False)
              continue
          if sampler[7] != 0 and overlap > sampler[7]:
              satisfied.append(False)
              continue
          satisfied.append(True)
          if not satisfy_all:
              return True
  
      if satisfy_all:
          return np.all(satisfied)
      else:
          return False
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import random
  import math
  import cv2
label_desc: Use image node_id 13 for calling a global function with example usage: satisfy_sample_constraint(sampler, sample_bbox, gt_bboxes, satisfy_all) and returns: True, np, False, True