code: def _set_results_dir(self):
          
          if self.running_instance_id:
              self.results_dir = os.path.join(
                  self.results_dir,
                  self.cloud,
                  self.image_id,
                  self.running_instance_id
              )
          else:
              self.results_dir = os.path.join(
                  self.results_dir,
                  self.cloud,
                  self.instance_ip
              )
  
          try:
              os.makedirs(self.results_dir)
          except OSError as error:
              if not os.path.isdir(self.results_dir):
                  raise IpaCloudException(
                      'Unable to create ipa results directory: %s' % error
                  )
  
          self.time_stamp = datetime.now().strftime('%Y%m%d%H%M%S')
          self.log_file = ''.join(
              [self.results_dir, os.sep, self.time_stamp, '.log']
          )
          self.logger.debug('Created log file %s' % self.log_file)
  
          self.results_file = ''.join(
              [self.results_dir, os.sep, self.time_stamp, '.results']
          )
          self.logger.debug('Created results file %s' % self.results_file)
  
          # Add log file handler
          file_handler = logging.FileHandler(self.log_file)
          file_handler.setLevel(logging.DEBUG)
          file_handler.setFormatter(logging.Formatter('\n%(message)s\n'))
          self.logger.addHandler(file_handler)
docs: Create results directory if not exists.