code: def read_pdf(
      file: AbstractFile,
      scale: float = 300 / 72,
      rgb_mode: bool = True,
      password: Optional[str] = None,
      **kwargs: Any,
  ) -> List[np.ndarray]:
      """Read a PDF file and convert it into an image in numpy format
  
      >>> from doctr.documents import read_pdf
      >>> doc = read_pdf("path/to/your/doc.pdf")
  
      Args:
          file: the path to the PDF file
          scale: rendering scale (1 corresponds to 72dpi)
          rgb_mode: if True, the output will be RGB, otherwise BGR
          password: a password to unlock the document, if encrypted
          kwargs: additional parameters to :meth:`pypdfium2.PdfPage.render`
  
      Returns:
          the list of pages decoded as numpy ndarray of shape H x W x C
      """
  
      # Rasterise pages to numpy ndarrays with pypdfium2
      import pypdfium2 as pdfium
  
      pdf = pdfium.PdfDocument(file, password=password, autoclose=True)
      return [
          page.render(
              scale=scale, rev_byteorder=rgb_mode, **kwargs
          ).to_numpy()
          for page in pdf
      ]
  
imports: from typing import List, Union, Any, Tuple, Optional
  import requests
  import torch
  from langchain.docstore.document import Document
  from langchain.document_loaders import ImageCaptionLoader
  import numpy
  from utils import get_device, clear_torch_cache, NullContext
  from doctr.utils.common_types import AbstractFile
label_desc: Use image node_id 5 for calling a global function with example usage: read_pdf(file, scale, rgb_mode, password) and returns: unknown