code: def logdir(self):
      
  
      run_name = ncluster_globals.get_run_for_task(self)
      logdir = ncluster_globals.get_logdir(run_name)
      if logdir:
        return logdir
  
      # create logdir. Only single task in a group creates the logdir
      if ncluster_globals.is_chief(self, run_name):
        chief = self
      else:
        chief = ncluster_globals.get_chief(run_name)
  
      chief.setup_logdir()
      return ncluster_globals.get_logdir(run_name)
docs: Returns logging directory, creating one if necessary. See "Logdir" section  of design doc on naming convention.