<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_gremlin(self):
 """Return a unicode object with the Gremlin representation of this BasicBlock."""

        self.validate()
        if self.optional:
            operation = u'optional'
        else:
            operation = u'back'

        mark_name, _ = self.location.get_location_name()

        return u'{operation}({mark_name})'.format(
            operation=operation,
            mark_name=safe_quoted_string(mark_name))