code: def filter_gt_instances(
      batch_data_samples: SampleList,
      score_thr: float = None,
      wh_thr: tuple = None,
  ):
      """Filter ground truth (GT) instances by score and/or size.
  
      Args:
          batch_data_samples (SampleList): The Data
              Samples. It usually includes information such as
              `gt_instance`, `gt_panoptic_seg` and `gt_sem_seg`.
          score_thr (float): The score filter threshold.
          wh_thr (tuple):  Minimum width and height of bbox.
  
      Returns:
          SampleList: The Data Samples filtered by score and/or size.
      """
  
      if score_thr is not None:
          batch_data_samples = _filter_gt_instances_by_score(
              batch_data_samples, score_thr
          )
      if wh_thr is not None:
          batch_data_samples = _filter_gt_instances_by_size(
              batch_data_samples, wh_thr
          )
      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 18 for calling a global function with example usage: filter_gt_instances(batch_data_samples, score_thr, wh_thr) and returns: batch_data_samples