code: def make_tensor(l, max_len):
      tensor = np.zeros((len(l), max_len, l[0].shape[-1]))
      for i in range(len(l)):
          if len(l[i]):
              tensor[i, : min(max_len, l[i].shape[0]), :] = l[i][
                  : min(max_len, l[i].shape[0])
              ]
  
      return th.from_numpy(tensor).float()
  
file_path: moe-embedding-expert/train.py
imports: import torch
  from torch.utils.data import Dataset, DataLoader
  import LSMDC
  import MSRVTT
  import numpy
  import torch.optim
  import argparse
  from loss import MaxMarginRankingLoss
  from model import Net
  from torch.autograd import Variable
  import os
  import random
  from qcm_sampler import QCMSampler
  from MSR_sampler import MSRSampler
label_desc: Use image node_id 3 for calling a global function with example usage: make_tensor(l, max_len) and returns: th