<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_match(self):
 """Return a unicode object with the MATCH representation of this TernaryConditional."""

        self.validate()

        # For MATCH, an additional validation step is needed -- we currently do not support
        # emitting MATCH code for TernaryConditional that contains another TernaryConditional
        # anywhere within the predicate expression. This is because the predicate expression
        # must be surrounded in quotes, and it is unclear whether nested/escaped quotes would work.
        def visitor_fn(expression):
            """Visitor function that ensures the predicate does not contain TernaryConditionals."""
            if isinstance(expression, TernaryConditional):
                raise ValueError(u'Cannot emit MATCH code for TernaryConditional that contains '
                                 u'in its predicate another TernaryConditional: '
                                 u'{} {}'.format(expression, self))
            return expression

        self.predicate.visit_and_update(visitor_fn)

        format_spec = u'if(eval("%(predicate)s"), %(if_true)s, %(if_false)s)'
        predicate_string = self.predicate.to_match()
        if u'"' in predicate_string:
            raise AssertionError(u'Found a double-quote within the predicate string, this would '
                                 u'have terminated the if(eval()) early and should be fixed: '
                                 u'{} {}'.format(predicate_string, self))

        return format_spec % dict(predicate=predicate_string,
                                  if_true=self.if_true.to_match(),
                                  if_false=self.if_false.to_match())