code: def reformat(self, snip, index=None):
          
          if index is not None:
              return self.reformat(snip), len(self.reformat(snip[:index]))
          else:
              return self.repl_proc(snip, reformatting=True, log=False)
docs: Post process a preprocessed snippet.