<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def convert_unit(number, input_unit, expected_unit):
 """A helper to convert the unit. :param number: The number to update. :type number: int :param input_unit: The unit of the number. :type input_unit: safe.definitions.units :param expected_unit: The expected output unit. :type expected_unit: safe.definitions.units :return: The new number in the expected unit. :rtype: int """

    for mapping in unit_mapping:
        if input_unit == mapping[0] and expected_unit == mapping[1]:
            return number * mapping[2]
        if input_unit == mapping[1] and expected_unit == mapping[0]:
            return number / mapping[2]

    return None