def _to_unit_base(self, base_unit, values, unit, from_unit):
self._is_numeric(values)<EOL>namespace = {'<STR_LIT>': self, '<STR_LIT>': values}<EOL>if not from_unit == base_unit:<EOL><INDENT>self.is_unit_acceptable(from_unit, True)<EOL>statement = '<STR_LIT>'.format(<EOL>self._clean(from_unit), self._clean(base_unit))<EOL>values = eval(statement, namespace)<EOL>namespace['<STR_LIT>'] = values<EOL><DEDENT>if not unit == base_unit:<EOL><INDENT>self.is_unit_acceptable(unit, True)<EOL>statement = '<STR_LIT>'.format(<EOL>self._clean(base_unit), self._clean(unit))<EOL>values = eval(statement, namespace)<EOL><DEDENT>return values<EOL>
Return values in a given unit given the input from_unit.