code: def __init__(self, name, cfg, mode="train"):
      assert mode in [
          "train",
          "valid",
          "test",
          "infer",
      ], "Unknown mode type {}".format(mode)
      self.name = name
      self.is_training = mode == "train"
      self.mode = mode
      self.cfg = cfg
      self.dataloader = None
  
imports: import os
  import logging
  import paddle.fluid
label_desc: Use image node_id 1 to create a new ModelBase object from inherited base classes: object with example: obj = ModelBase(name, cfg, mode)