code: def _axisLabelToStatLocation(
      label: AxisLabelDescriptor,
  ) -> Dict:
      label_format = label.getFormat()
      name = {"en": label.name, **label.labelNames}
      flags = _labelToFlags(label)
      if label_format == 1:
          return dict(name=name, value=label.userValue, flags=flags)
      if label_format == 3:
          return dict(
              name=name,
              value=label.userValue,
              linkedValue=label.linkedUserValue,
              flags=flags,
          )
      if label_format == 2:
          res = dict(
              name=name,
              nominalValue=label.userValue,
              flags=flags,
          )
          if label.userMinimum is not None:
              res["rangeMinValue"] = label.userMinimum
          if label.userMaximum is not None:
              res["rangeMaxValue"] = label.userMaximum
          return res
      raise NotImplementedError("Unknown STAT label format")
  
file_path: catboost/contrib/python/fonttools/fontTools/varLib/stat.py
imports: from __future__ import annotations
  from typing import Dict, List, Union
  import fontTools.otlLib.builder
  from fontTools.designspaceLib import AxisLabelDescriptor, DesignSpaceDocument, DesignSpaceDocumentError, LocationLabelDescriptor
  from fontTools.designspaceLib.types import Region, getVFUserRegion, locationInRegion
  from fontTools.ttLib import TTFont
label_desc: Use image node_id 5 for calling a global function with example usage: _axisLabelToStatLocation(label) and returns: dict, dict, res