code: def __simplify_note(
      key: Union[str, _IterableLike[str], Iterable[str]],
      additional_acc: str = "",
      unicode: bool = True,
  ) -> Union[str, np.ndarray]:
      """Take in a note name and simplify by canceling sharp-flat pairs, and doubling accidentals as appropriate.
  
      >>> librosa.__simplify_note('C♭♯')
      'C'
  
      >>> librosa.__simplify_note('C♭♭♭')
      'C♭𝄫'
  
      >>> librosa.__simplify_note(['C♭♯', 'C♭♭♭'])
      array(['C', 'C♭𝄫'], dtype='<U3')
  
      """
      if not isinstance(key, str):
          return np.array(
              [
                  __simplify_note(n + additional_acc, unicode=unicode)
                  for n in key
              ]
          )
  
      match = NOTE_RE.match(key + additional_acc)
  
      if not match:
          raise ParameterError(f"Improper key format: {key:s}")
  
      letter = match.group("note").upper()
      accidental = match.group("accidental")
      counter = Counter(accidental)
      offset = sum([ACC_MAP[acc] * counter[acc] for acc in ACC_MAP])
  
      simplified_note = letter
      if offset >= 0:
          simplified_note += "♯" * (offset % 2) + "𝄪" * (offset // 2)
      else:
          simplified_note += "♭" * (offset % 2) + "𝄫" * (
              abs(offset) // 2
          )
  
      if not unicode:
          translations = str.maketrans(
              {"♯": "#", "𝄪": "##", "♭": "b", "𝄫": "bb", "♮": "n"}
          )
          simplified_note = simplified_note.translate(translations)
  
      return simplified_note
  
imports: import re
  import numpy
  from numba import jit
  from collections import Counter
  from .intervals import INTERVALS
  from .._cache import cache
  from ..util.exceptions import ParameterError
  from typing import Dict, List, Iterable, Union, overload
  from ..util.decorators import vectorize
  from .._typing import _ScalarOrSequence, _FloatLike_co, _SequenceLike, _IterableLike
label_desc: Use image node_id 13 for calling a global function with example usage: __simplify_note(key, additional_acc, unicode) and returns: simplified_note, np