code: def _fetch_datalist(self, request, datastore: Datastore):
      cache_dir = os.path.join(self.bundle_path, "cache", "train_ds")
      remove_file(cache_dir)
  
      source = request.get("dataset_source")
      max_region = request.get("dataset_max_region", (10240, 10240))
      max_region = (
          (max_region, max_region)
          if isinstance(max_region, int)
          else max_region[:2]
      )
  
      ds = split_dataset(
          datastore=datastore,
          cache_dir=cache_dir,
          source=source,
          groups=None,
          tile_size=self.tile_size,
          max_region=max_region,
          limit=request.get("dataset_limit", 0),
          randomize=request.get("dataset_randomize", True),
      )
      logger.info(f"Split data (len: {len(ds)}) based on each nuclei")
  
      limit = request.get("dataset_limit", 0)
      ds_new: list = []
      xtractor = PatchExtractor(self.patch_size, self.step_size)
      out_dir = os.path.join(cache_dir, "nuclei_hovernet")
      os.makedirs(out_dir, exist_ok=True)
  
      for d in tqdm(ds):
          if 0 < limit < len(ds_new):
              ds_new = ds_new[:limit]
              break
  
          base_name = pathlib.Path(d["image"]).stem
          img = np.array(Image.open(d["image"]).convert("RGB"))
          ann_type = np.array(Image.open(d["label"]))
  
          numLabels, ann_inst, _, _ = cv2.connectedComponentsWithStats(
              ann_type, 4, cv2.CV_32S
          )
          ann = np.dstack([ann_inst, ann_type])
  
          img = np.concatenate([img, ann], axis=-1)
          sub_patches = xtractor.extract(img, self.extract_type)
  
          pbar_format = "Extracting  : |{bar}| {n_fmt}/{total_fmt}[{elapsed}<{remaining},{rate_fmt}]"
          pbar = tqdm(
              total=len(sub_patches),
              leave=False,
              bar_format=pbar_format,
              ascii=True,
              position=1,
          )
  
          for idx, patch in enumerate(sub_patches):
              image_patch = patch[..., :3]
              inst_map_patch = patch[..., 3:4]
              type_map_patch = patch[..., 4:5]
  
              i = f"{out_dir}/{base_name}_{idx:03d}_image.npy"
              j = f"{out_dir}/{base_name}_{idx:03d}_inst_map.npy"
              k = f"{out_dir}/{base_name}_{idx:03d}_type_map.npy"
  
              np.save(i, image_patch)
              np.save(j, inst_map_patch)
              np.save(k, type_map_patch)
              ds_new.append(
                  {"image": i, "label_inst": j, "label_type": k}
              )
              pbar.update()
          pbar.close()
  
          if 0 < limit < len(ds_new):
              ds_new = ds_new[:limit]
              break
  
      logger.info(f"Final Records with hovernet patches: {len(ds_new)}")
      return ds_new
  
imports: import copy
  import logging
  import os
  import pathlib
  from typing import Dict, Optional
  import cv2
  import numpy
  from lib.hovernet import PatchExtractor
  from lib.utils import split_dataset
  from PIL import Image
  from tqdm import tqdm
  from monailabel.interfaces.datastore import Datastore
  from monailabel.tasks.train.bundle import BundleConstants, BundleTrainTask
  from monailabel.utils.others.generic import remove_file
label_desc: Use image node_id 2 for calling the HovernetNuclei obj's underlying member method code with example usage: obj._fetch_datalist(request, datastore) and returns: ds_new