code: def __init__(self, args):
      if args.aminer:
          dataset = AminerDataset(args.path)
      else:
          dataset = CustomDataset(args.path)
      self.data = DataReader(dataset, args.min_count, args.care_type)
      dataset = Metapath2vecDataset(self.data, args.window_size)
      self.dataloader = DataLoader(
          dataset,
          batch_size=args.batch_size,
          shuffle=True,
          num_workers=args.num_workers,
          collate_fn=dataset.collate,
      )
  
      self.output_file_name = args.output_file
      self.emb_size = len(self.data.word2id)
      self.emb_dimension = args.dim
      self.batch_size = args.batch_size
      self.iterations = args.iterations
      self.initial_lr = args.initial_lr
      self.skip_gram_model = SkipGramModel(
          self.emb_size, self.emb_dimension
      )
  
      self.use_cuda = torch.cuda.is_available()
      self.device = torch.device("cuda" if self.use_cuda else "cpu")
      if self.use_cuda:
          self.skip_gram_model.cuda()
  
file_path: dgl/examples/pytorch/metapath2vec/metapath2vec.py
imports: import argparse
  import torch
  import torch.optim
  from download import AminerDataset, CustomDataset
  from model import SkipGramModel
  from reading_data import DataReader, Metapath2vecDataset
  from torch.utils.data import DataLoader
  from tqdm import tqdm
label_desc: Use image node_id 1 to create a new Metapath2VecTrainer object  with example: obj = Metapath2VecTrainer(args)