code: def setup_logfile(self, logfile, mode='w'):
          '''start logging to the given logfile, with timestamps'''
          self.logfile = open(logfile, mode=modef setup_logfile(self, logfile, mode='w'):
          '''start logging to the given logfile, with timestamps'''
          self.logfile = open(logfile, mode=mode)
docs: start logging to the given logfile, with timestamps