code: def _filter_gt_instances_by_size(
      batch_data_samples: SampleList, wh_thr: tuple
  ) -> SampleList:
      """Filter ground truth (GT) instances by size.
  
      Args:
          batch_data_samples (SampleList): The Data
              Samples. It usually includes information such as
              `gt_instance`, `gt_panoptic_seg` and `gt_sem_seg`.
          wh_thr (tuple):  Minimum width and height of bbox.
  
      Returns:
          SampleList: The Data Samples filtered by score.
      """
      for data_samples in batch_data_samples:
          bboxes = data_samples.gt_instances.bboxes
          if bboxes.shape[0] > 0:
              w = bboxes[:, 2] - bboxes[:, 0]
              h = bboxes[:, 3] - bboxes[:, 1]
              data_samples.gt_instances = data_samples.gt_instances[
                  (w > wh_thr[0]) & (h > wh_thr[1])
              ]
      return batch_data_samples
  
imports: from functools import partial
  from typing import List, Optional, Sequence, Tuple, Union
  import numpy
  import torch
  from mmengine.structures import InstanceData
  from mmengine.utils import digit_version
  from six.moves import map, zip
  from torch import Tensor
  from torch.autograd import Function
  from torch.nn import functional
  from mmdet.structures import SampleList
  from mmdet.structures.bbox import BaseBoxes, get_box_type, stack_boxes
  from mmdet.structures.mask import BitmapMasks, PolygonMasks
  from mmdet.utils import OptInstanceList
label_desc: Use image node_id 17 for calling a global function with example usage: _filter_gt_instances_by_size(batch_data_samples, wh_thr) and returns: batch_data_samples