code: def test_text_rotated_urls():
      pikepdf = pytest.importorskip("pikepdf")
  
      test_url = "https://test_text_urls.matplotlib.org/"
  
      fig = plt.figure(figsize=(1, 1))
      fig.text(0.1, 0.1, "N", rotation=45, url=f"{test_url}")
  
      with io.BytesIO() as fd:
          fig.savefig(fd, format="pdf")
  
          with pikepdf.Pdf.open(fd) as pdf:
              annots = pdf.pages[0].Annots
  
              # Iteration over Annots must occur within the context manager,
              # otherwise it may fail depending on the pdf structure.
              annot = next(
                  (a for a in annots if a.A.URI == f"{test_url}"), None
              )
              assert annot is not None
              assert getattr(annot, "QuadPoints", None) is not None
              # Positions in points (72 per inch)
              assert annot.Rect[0] == annot.QuadPoints[
                  6
              ] - decimal.Decimal("0.00001")
  
imports: import datetime
  import decimal
  import io
  import os
  from pathlib import Path
  import numpy
  import pytest
  import matplotlib
  from matplotlib import pyplot, rcParams, font_manager
  from matplotlib.cbook import _get_data_path
  from matplotlib.ft2font import FT2Font
  from matplotlib.font_manager import findfont, FontProperties
  from matplotlib.backends._backend_pdf_ps import get_glyphs_subset
  from matplotlib.backends.backend_pdf import PdfPages
  from matplotlib.patches import Rectangle
  from matplotlib.testing.decorators import check_figures_equal, image_comparison
  from matplotlib.testing._markers import needs_usetex
label_desc: Use image node_id 12 for calling a global function with example usage: test_text_rotated_urls() without return types