code: def close_log(log_file):
      
      sys.stdout = sys.__stdout__
      if log_file is not None:
          log_file.close()
          del log_file
docs: Closes the open file and returns :py:class:`sys.stdout` to the default (i.e., console output).
  
      Args:
          log_file (file): The file object to close.