class_docstr: Automatically checking record template
docstr: automatically checking the files and then run the concrete generating task
docstr_tok: ["automatically","checking","the","files","and","then","run","the","concrete","generating","task"]
code: def generate(self, *args, **kwargs):
      """automatically checking the files and then run the concrete generating task"""
      if self.skip_existing:
          try:
              self.check(include_self=True, parents=False)
          except FileNotFoundError:
              pass  # continue to generating metrics
          else:
              logger.info(
                  "The results has previously generated, Generation skipped."
              )
              return
  
      try:
          self.check()
      except FileNotFoundError:
          logger.warning(
              "The dependent data does not exists. Generation skipped."
          )
          return
      artifact_dict = self._generate(*args, **kwargs)
      if isinstance(artifact_dict, dict):
          self.save(**artifact_dict)
      return artifact_dict
  
imports: import logging
  import warnings
  import pandas
  import numpy
  from tqdm import trange
  from pprint import pprint
  from typing import Union, List, Optional, Dict
  from qlib.utils.exceptions import LoadObjectError
  from ..contrib.evaluate import risk_analysis, indicator_analysis
  from ..data.dataset import DatasetH
  from ..data.dataset.handler import DataHandlerLP
  from ..backtest import backtest
  from ..log import get_module_logger
  from ..utils import fill_placeholder, flatten_dict, class_casting, get_date_by_shift
  from ..utils.time import Freq
  from ..utils.data import deepcopy_basic_type
  from ..utils.exceptions import QlibException
  from ..contrib.eva.alpha import calc_ic, calc_long_short_return, calc_long_short_prec
label_desc: Use image node_id 2 for calling the ACRecordTemp obj's underlying member method code with example usage: obj.generate() and returns: artifact_dict