<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def format_value(self, val):
 """Helper function to format a value."""

        if isinstance(val, six.text_type):
            return self.format_string(val)
        else:
            return six.text_type(val)