code: def _radar_factory(num_vars: int) -> np.ndarray:
      theta = np.linspace(0, 2 * np.pi, num_vars, endpoint=False)
  
      class RadarAxes(PolarAxes):  # type: ignore
          """For projecting to a radial axis based on
          https://matplotlib.org/stable/gallery/specialty_plots/radar_chart.html
          """
  
          name = "radar"
  
          def __init__(self, *args: Any, **kwargs: Any) -> None:
              super().__init__(*args, **kwargs)
              self.set_theta_zero_location("N")
  
          def fill(
              self, *args: Any, closed: bool = True, **kwargs: Any
          ) -> Any:
              return super().fill(closed=closed, *args, **kwargs)
  
          def plot(self, *args: Any, **kwargs: Any) -> None:
              lines = super().plot(*args, **kwargs)
              for line in lines:
                  self._close_line(line)
  
          def _close_line(self, line: Any) -> None:
              x, y = line.get_data()
              if x[0] != x[-1]:
                  x = np.append(x, x[0])
                  y = np.append(y, y[0])
                  line.set_data(x, y)
  
          def set_varlabels(self, labels: Any) -> None:
              self.set_thetagrids(np.degrees(theta), labels)
  
          def _gen_axes_patch(self) -> Circle:
              return Circle((0.5, 0.5), 0.5)
  
      register_projection(RadarAxes)
      return theta
  
file_path: tslumen/tslumen/plot/static/comparison.py
imports: from typing import Tuple, Any
  from dataclasses import dataclass
  from itertools import cycle
  import numpy
  import pandas
  import matplotlib.pyplot
  from matplotlib.patches import Circle
  from matplotlib.projections.polar import PolarAxes
  from matplotlib.projections import register_projection
  from matplotlib.ticker import StrMethodFormatter
  from tslumen.plot.static.base import Figure
label_desc: Use image node_id 1 for calling a global function with example usage: _radar_factory(num_vars) and returns: theta, super, Circle