code: def forward_image(
      predictor: OCRPredictor, image: np.ndarray, device: torch.device
  ) -> np.ndarray:
      """Forward an image through the predictor
  
      Args:
      ----
          predictor: instance of OCRPredictor
          image: image to process
          device: torch.device, the device to process the image on
  
      Returns:
      -------
          segmentation map
      """
      with torch.no_grad():
          processed_batches = predictor.det_predictor.pre_processor(
              [image]
          )
          out = predictor.det_predictor.model(
              processed_batches[0].to(device), return_model_output=True
          )
          seg_map = out["out_map"].to("cpu").numpy()
  
      return seg_map
  
imports: import numpy
  import torch
  from doctr.models import ocr_predictor
  from doctr.models.predictor import OCRPredictor
label_desc: Use image node_id 2 for calling a global function with example usage: forward_image(predictor, image, device) and returns: seg_map