<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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))