<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(self, conversion_mapping, inplace=False):
 """Converts units based on provided unit conversion factors Parameters conversion_mapping: dict for each unit for which a conversion should be carried out, provide current unit and target unit and conversion factor {<current unit>: [<target unit>, <conversion factor>]} inplace: bool, default False if True, do operation inplace and return None """

        ret = copy.deepcopy(self) if not inplace else self
        for current_unit, (new_unit, factor) in conversion_mapping.items():
            factor = pd.to_numeric(factor)
            where = ret.data['unit'] == current_unit
            ret.data.loc[where, 'value'] *= factor
            ret.data.loc[where, 'unit'] = new_unit
        if not inplace:
            return ret