code: def __init__(self, path, image_size=(112, 112), is_train=True):
      self.path = path
      self.image_size = image_size
      self.widx = 0
      self.wlabel = 0
      self.max_label = -1
      # assert not osp.exists(path), '%s exists' % path
      if is_train:
          rec_file = osp.join(path, "train.rec")
          idx_file = osp.join(path, "train.idx")
      else:
          rec_file = osp.join(path, "val.rec")
          idx_file = osp.join(path, "val.idx")
      # assert not osp.exists(rec_file), '%s exists' % rec_file
      if not osp.exists(path):
          os.makedirs(path)
      self.writer = mx.recordio.MXIndexedRecordIO(
          idx_file, rec_file, "w"
      )
      self.meta = []
  
file_path: insightface/reconstruction/jmlr/rec_builder.py
imports: import pickle
  import numpy
  import os
  import os.path
  import glob
  import argparse
  import cv2
  import time
  import datetime
  import pickle
  import sklearn
  import mxnet
  from utils.utils_config import get_config
  from dataset import FaceDataset, Rt26dof
label_desc: Use image node_id 1 to create a new RecBuilder object  with example: obj = RecBuilder(path, image_size, is_train)