code: def test_read_pdf(mock_pdf):
      doc = io.read_pdf(mock_pdf)
      _check_doc_content(doc, 2)
  
      # Test with Path
      doc = io.read_pdf(Path(mock_pdf))
      _check_doc_content(doc, 2)
  
      with open(mock_pdf, "rb") as f:
          doc = io.read_pdf(f.read())
      _check_doc_content(doc, 2)
  
      # Wrong input type
      with pytest.raises(TypeError):
          _ = io.read_pdf(123)
  
      # Wrong path
      with pytest.raises(FileNotFoundError):
          _ = io.read_pdf("my_imaginary_file.pdf")
  
file_path: doctr/tests/common/test_io.py
imports: from io import BytesIO
  from pathlib import Path
  import numpy
  import pytest
  import requests
  from doctr import io
label_desc: Use image node_id 2 for calling a global function with example usage: test_read_pdf(mock_pdf) without return types