code: def _strip_counters(self, sub_line):
          
          try:
              end = sub_line.rindex('}')
          except ValueError:
              return sub_line
          else:
              return sub_line[:(end + 1)]
docs: Find the codeline end by taking out the counters and durations.