<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def formatted(self, func):
 """Return the string with non-literal parts formatted. Args: func (callable):
 Callable that translates a string into a formatted string. Returns: `EscapedString` object. """

        other = EscapedString.__new__(EscapedString)
        other.strings = []

        for is_literal, value in self.strings:
            if not is_literal:
                value = func(value)
            other.strings.append((is_literal, value))
        return other