<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def converter(val, current_unit, destination_unit):
 """Convert from one unit to another. Parameters val : number Number to convert. current_unit : string Current unit. destination_unit : string Destination unit. Returns ------- number Converted value. """

    x = val
    for dic in dicts.values():
        if current_unit in dic.keys() and destination_unit in dic.keys():
            try:
                native = eval(dic[current_unit][0])
            except ZeroDivisionError:
                native = np.inf
            x = native  # noqa: F841
            try:
                out = eval(dic[destination_unit][1])
            except ZeroDivisionError:
                out = np.inf
            return out
    # if all dictionaries fail
    if current_unit is None and destination_unit is None:
        pass
    else:
        warnings.warn(
            "conversion {0} to {1} not valid: returning input".format(
                current_unit, destination_unit
            )
        )
    return val