code: def test_ellipse_vertices():
      # expect 0 for 0 ellipse width, height
      ellipse = Ellipse(xy=(0, 0), width=0, height=0, angle=0)
      assert_almost_equal(
          ellipse.get_vertices(),
          [(0.0, 0.0), (0.0, 0.0)],
      )
      assert_almost_equal(
          ellipse.get_co_vertices(),
          [(0.0, 0.0), (0.0, 0.0)],
      )
  
      ellipse = Ellipse(xy=(0, 0), width=2, height=1, angle=30)
      assert_almost_equal(
          ellipse.get_vertices(),
          [
              (
                  ellipse.center[0] + ellipse.width / 4 * np.sqrt(3),
                  ellipse.center[1] + ellipse.width / 4,
              ),
              (
                  ellipse.center[0] - ellipse.width / 4 * np.sqrt(3),
                  ellipse.center[1] - ellipse.width / 4,
              ),
          ],
      )
      assert_almost_equal(
          ellipse.get_co_vertices(),
          [
              (
                  ellipse.center[0] - ellipse.height / 4,
                  ellipse.center[1] + ellipse.height / 4 * np.sqrt(3),
              ),
              (
                  ellipse.center[0] + ellipse.height / 4,
                  ellipse.center[1] - ellipse.height / 4 * np.sqrt(3),
              ),
          ],
      )
      v1, v2 = np.array(ellipse.get_vertices())
      np.testing.assert_almost_equal((v1 + v2) / 2, ellipse.center)
      v1, v2 = np.array(ellipse.get_co_vertices())
      np.testing.assert_almost_equal((v1 + v2) / 2, ellipse.center)
  
      ellipse = Ellipse(
          xy=(2.252, -10.859), width=2.265, height=1.98, angle=68.78
      )
      v1, v2 = np.array(ellipse.get_vertices())
      np.testing.assert_almost_equal((v1 + v2) / 2, ellipse.center)
      v1, v2 = np.array(ellipse.get_co_vertices())
      np.testing.assert_almost_equal((v1 + v2) / 2, ellipse.center)
  
imports: import numpy
  from numpy.testing import assert_almost_equal, assert_array_equal
  import pytest
  import matplotlib
  from matplotlib.patches import Annulus, Ellipse, Patch, Polygon, Rectangle, FancyArrowPatch, FancyArrow, BoxStyle, Arc
  from matplotlib.testing.decorators import image_comparison, check_figures_equal
  from matplotlib.transforms import Bbox
  import matplotlib.pyplot
  from matplotlib import collections, colors, patches, path, transforms, rcParams
  import sys
label_desc: Use image node_id 3 for calling a global function with example usage: test_ellipse_vertices() without return types