code: def _build_logger(self, log_dir):
      log_path = os.path.join(log_dir, self.opt["name"])
      logger_path = os.path.join(log_path, "txt")
      tensorboard_path = os.path.join(log_path, "tensorboard")
      if not os.path.exists(logger_path):
          os.makedirs(logger_path)
      if not os.path.exists(tensorboard_path):
          os.makedirs(tensorboard_path)
      self.logger = get_log(logger_path + "log.txt")
      self.writer = SummaryWriter(log_dir=tensorboard_path)
  
imports: import os
  import resource
  import numpy
  import torch
  import torch.optim
  from torch.utils.data import DataLoader
  from torch.utils.tensorboard import SummaryWriter
  from graph4nlp.pytorch.models.graph2seq import Graph2Seq
  from graph4nlp.pytorch.models.graph2seq_loss import Graph2SeqLoss
  from graph4nlp.pytorch.modules.evaluation import BLEU
  from args import get_args
  from build_model import get_model
  from dataset import IWSLT14Dataset
  from utils import WarmupCosineSchedule, get_log, wordid2str
label_desc: Use image node_id 3 for calling the NMT obj's underlying member method code with example usage: obj._build_logger(log_dir) without return types