code: def build_mask(frame, detections, tracked_objects):
      # create a mask of ones
      mask = np.ones(frame.shape[:2], frame.dtype)
      # set to 0 on detections and tracked_objects
      for det in detections:
          i = det.points.astype(int)
          mask[i[0, 1] : i[1, 1], i[0, 0] : i[1, 0]] = 0
      for obj in tracked_objects:
          i = obj.estimate.astype(int)
          mask[i[0, 1] : i[1, 1], i[0, 0] : i[1, 0]] = 0
      return mask
  
imports: import argparse
  import os.path
  import numpy
  from norfair import Tracker, drawing, metrics, video
  from norfair.camera_motion import MotionEstimator
  from norfair.filter import FilterPyKalmanFilterFactory
label_desc: Use image node_id 1 for calling a global function with example usage: build_mask(frame, detections, tracked_objects) and returns: mask