code: def _canonical_freqstr(
      n: int, name: str, suffix: Optional[str] = None
  ) -> str:
      """Canonical name of frequency.
  
      >>> _canonical_freqstr(1, "X")
      'X'
      >>> _canonical_freqstr(3, "X")
      '3X'
      >>> _canonical_freqstr(3, "X", "Y")
      '3X-Y'
  
      This allows us to easily string compare frequencies
      (solves ``"1X" != "X"``).
      """
  
      if suffix:
          name = f"{name}-{suffix}"
  
      if n == 1:
          return name
  
      return f"{n}{name}"
  
imports: from __future__ import annotations
  import re
  from dataclasses import dataclass
  from typing import Tuple, Optional
  import numpy
  from gluonts import maybe
label_desc: Use image node_id 1 for calling a global function with example usage: _canonical_freqstr(n, name, suffix) and returns: n, name, name