code: def test_get_packed_offsets_expand(widths, total, sep, expected):
      result = _get_packed_offsets(widths, total, sep, mode="expand")
      assert result[0] == expected[0]
      assert_allclose(result[1], expected[1])
  
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 7 for calling a global function with example usage: test_get_packed_offsets_expand(widths, total, sep, expected) without return types