<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_str(cls, values, callback=None):
 """Convert many records's values to str """

        if callback and callable(callback):
            if isinstance(values, dict):
                return callback(_es.to_str(values))

            return [callback(_es.to_str(i)) for i in values]
        return _es.to_str(values)