code: def __init__(self, config, outpath, prjname="", name=""):
      super(Logger, self).__init__(config, outpath, prjname, name)
      import os
      from ..util.io import gen_datestr
  
      assert config["format"].lower() == "csv", (
          "Data logger "
          + self.name
          + ": unsupported format "
          + config["format"]
          + "!"
      )
      assert config["content"].lower() == "ybest", (
          "Data logger "
          + self.name
          + ": unsupported content "
          + config["content"]
          + "!"
      )
      filename = (
          self.name + "_" + self.prjname + "_" + gen_datestr() + ".csv"
          if config["filename"] is None
          else config["filename"]
      )
      self.filename = os.path.join(self.outpath, filename)
      self.fileout = None
      self.write_headline = True
      try:
          self.fileout = open(self.filename, "w")
      except:
          print(
              (
                  "Data logger "
                  + self.name
                  + " fails to open the output file "
                  + self.filename
                  + "!"
              )
          )
  
file_path: GPyOpt/GPyOpt/interface/output.py
imports: import numpy
label_desc: Use image node_id 1 to create a new Logger object from inherited base classes: DataSaver with example: obj = Logger(config, outpath, prjname, name)