code: def convert_unit(self, conversion_mapping, inplace=False):
          
          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
docs: 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