code: def get_features(doc, blocks):
      encodings = []
      metadata = []
      sample_lengths = []
      for i in range(len(blocks)):
          encoding, other_data = get_page_encoding(doc[i], blocks[i])
          encodings.extend(encoding)
          metadata.append(other_data)
          sample_lengths.append(len(encoding))
      return encodings, metadata, sample_lengths
  
imports: from concurrent.futures import ThreadPoolExecutor
  from typing import List
  from transformers import LayoutLMv3ForTokenClassification
  from marker.bbox import unnormalize_box
  from transformers.models.layoutlmv3.image_processing_layoutlmv3 import normalize_box
  import io
  from PIL import Image
  from transformers import LayoutLMv3Processor
  import numpy
  from marker.settings import settings
  from marker.schema import Page, BlockType
  import torch
  from math import isclose
label_desc: Use image node_id 5 for calling a global function with example usage: get_features(doc, blocks) and returns: encodings,  metadata,  sample_lengths