docs: def get_mode_name(mode_const):
      """\
      Returns the mode name for the provided mode constant.
  
      :param int mode_const: The mode constant (see :py:module:`segno.consts`)
      """
      for name, val in consts.MODE_MAPPING.items():
          if val == mode_const:
              return name
      raise ModeError('Unknown mode "{0}"'.format(mode_const))