<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(value, source_unit, target_unit, fmt=False):
 """Converts value from source_unit to target_unit. Returns a tuple containing the converted value and target_unit. Having fmt set to True causes the value to be formatted to 1 decimal digit if it's a decimal or be formatted as integer if it's an integer. E.g: (120.0, 'min') (120, 'min') (0.5, 'hr') """

    orig_target_unit = target_unit
    source_unit = functions.value_for_key(INFORMATION_UNITS, source_unit)
    target_unit = functions.value_for_key(INFORMATION_UNITS, target_unit)

    q = ureg.Quantity(value, source_unit)
    q = q.to(ureg.parse_expression(target_unit))
    value = functions.format_value(q.magnitude) if fmt else q.magnitude
    return value, orig_target_unit