code: def test_get_packed_offsets(widths, total, sep, mode):
      # Check a (rather arbitrary) set of parameters due to successive similar
      # issue tickets (at least #10476 and #10784) related to corner cases
      # triggered inside this function when calling higher-level functions
      # (e.g. `Axes.legend`).
      # These are just some additional smoke tests. The output is untested.
      _get_packed_offsets(widths, total, sep, mode=mode)
  
imports: from collections import namedtuple
  import io
  import numpy
  from numpy.testing import assert_allclose
  import pytest
  from matplotlib.testing.decorators import check_figures_equal, image_comparison
  import matplotlib.pyplot
  import matplotlib.patches
  import matplotlib.lines
  from matplotlib.backend_bases import MouseButton, MouseEvent
  from matplotlib.offsetbox import AnchoredOffsetbox, AnnotationBbox, AnchoredText, DrawingArea, HPacker, OffsetBox, OffsetImage, PaddedBox, TextArea, VPacker, _get_packed_offsets
label_desc: Use image node_id 5 for calling a global function with example usage: test_get_packed_offsets(widths, total, sep, mode) without return types