code: def generate_annotations(
      num_annotations, num_classes=5, max_boxes=5, image_size=300
  ):
      """Generates num_annotations number of annotations based on passed in hyperparameters in same format as expected by find_label_issues and get_label_quality_scores"""
  
      annotations = []
      for i in range(num_annotations):
          annotations.append(
              generate_annotation(num_classes, image_size, max_boxes)
          )
      return annotations
  
imports: import os
  from collections import Counter, defaultdict
  from multiprocessing import Pool
  import numpy
  from cleanlab.internal.constants import ALPHA, BADLOC_THRESHOLD_FACTOR, CUSTOM_SCORE_WEIGHT_BADLOC, CUSTOM_SCORE_WEIGHT_OVERLOOKED, CUSTOM_SCORE_WEIGHT_SWAP, HIGH_PROBABILITY_THRESHOLD, LOW_PROBABILITY_THRESHOLD, OVERLOOKED_THRESHOLD_FACTOR, SWAP_THRESHOLD_FACTOR, TEMPERATURE
  from cleanlab.internal.object_detection_utils import bbox_xyxy_to_xywh, softmax, softmin1d
  from cleanlab.object_detection.filter import _calculate_true_positives_false_positives, _filter_by_class, _find_label_issues, _find_label_issues_per_box, _get_per_class_ap, _pool_box_scores_per_image, _process_class_list, find_label_issues
  from cleanlab.object_detection.rank import _compute_label_quality_scores, _get_aggregation_weights, _get_dist_matrix, _get_min_pred_prob, _get_overlap_matrix, _get_prediction_type, _get_valid_inputs_for_compute_scores, _get_valid_inputs_for_compute_scores_per_image, _get_valid_score, _get_valid_subtype_score_params, _has_overlap, _prune_by_threshold, _separate_label, _separate_prediction, compute_badloc_box_scores, compute_overlooked_box_scores, compute_swap_box_scores, get_label_quality_scores, issues_from_scores
  from cleanlab.object_detection.summary import bounding_box_size_distribution, class_label_distribution, get_sorted_bbox_count_idxs, object_counts_per_image, plot_class_distribution, plot_class_size_distributions, visualize, calculate_per_class_metrics, get_average_per_class_confusion_matrix
  import copy
  import warnings
  import matplotlib.pyplot
  import numpy
  import pytest
  from PIL import Image
label_desc: Use image node_id 6 for calling a global function with example usage: generate_annotations(num_annotations, num_classes, max_boxes, image_size) and returns: annotations