def __str__(self):
    """Returns the FSM template, mimic the input file."""

    result = '\n'.join([str(value) for value in self.values])
    result += '\n'

    for state in self.state_list:
      result += state % '\n%s\n'
      state_rules = '\n'.join([str(rule) for rule in self.states[state]])
      if state_rules:
        result += state_rules + '\n'

    return result
dataset/ETHPy150Open google/textfsm/textfsm.py/TextFSM.__str__/swapped operands of `%`