<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_values(self, pydict):
 """Convert knackhq data type instance to json friendly data. """

        new_dict = dict()
        for key, value in pydict.items():
            try: # is it's BaseDataType Instance
                new_dict[key] = value._data
            except AttributeError:
                new_dict[key] = value
        return new_dict