code: def warn(self,message):
          
          s = str(datetime.now()) + " WARNING: " + message + '\n'
          if self.echo:
              print(s,end='')
          if self.filename:
              self.f.write(s)
              self.f.flush
          warnings.warn(s,PyemuWarning)
docs: write a warning to the log file.
  
          Parameters
          ----------
          message : str
              the warning text