Programming language: [your favorite programming language] Create a script that merges nearby bounding boxes belonging to the same label ID. Process the output of a single neural network only. Do not support multiple networks in the data structure. The user supplies: - An array of BoundingBox objects from one inference frame. - Each BoundingBox contains label_id, label_name, probability, x, y, width, height, label_color_r, label_color_g, and label_color_b. - An array of target label IDs to process. - A non-negative pixel-distance threshold for merging boxes. Coordinates use the upper-left corner and integer pixel dimensions in the same image coordinate system. Supply valid, non-null input objects with positive widths and heights. If the local input class uses confidence instead of probability, adapt that member name. Create a CustomBBox class containing label_id, label_name, confidence, x, y, width, height, center_x, center_y, label_color_r, label_color_g, label_color_b, sum_confidence, and freq_confidence. Store merged results in a dictionary whose keys are string representations of label IDs and whose values are arrays of CustomBBox objects. For each input box in order: - Ignore labels not in the target label array. - Create a CustomBBox with sum_confidence equal to the input probability and freq_confidence equal to 1. - If its label has no dictionary entry, create an array containing this box. - Otherwise, compare it with the existing box families for that label in array order. - Calculate minimum edge-to-edge Euclidean distance. Overlapping boxes, edge contact, and corner contact have distance zero. Use the horizontal and vertical gaps between rectangles, not center-to-center distance. - If the distance is less than or equal to the threshold, merge into the first matching family and stop searching. The new rectangle must fully enclose both boxes. Update its integer center, add the incoming confidence to the cumulative confidence, and increment the count. Retain the existing family's label name and display colors. - If no family matches, append the new box as another family for that label. Never merge boxes with different label IDs. Support multiple target IDs in the same call. Preserve this first-match, one-pass behavior; do not replace it with a transitive or repeated global clustering algorithm. Results may depend on input order. Provide helpers to convert an input box, calculate rectangle distance, combine a family with an incoming box, calculate mean confidence from sum_confidence divided by freq_confidence, count final families for the selected labels, and reset the dictionary for the next frame. Leave unmerged boxes with their original confidence. Include an integration example that resets state, merges one frame, finalizes mean confidence, and counts the output families. Explain how to retrieve each label's results. Do not include inference acquisition or image drawing; those belong to the caller's application.