code: def __init__(
      self,
      cpn,
      name: str,
      config,
      ctx: "Context",
      artifact_describe: "ArtifactDescribe[AT, M]",
      apply_config: "ArtifactOutputApplySpec",
  ):
      self.name = name
      self.cpn = cpn
      self.config = config
      self.ctx = ctx
      self.artifact_describe = artifact_describe
      self.apply_config = apply_config
  
      self.recorder = _ArtifactsType([])
      self.current = 0
  
imports: import logging
  import typing
  from typing import Dict, Generic, List, Optional, Union
  from fate.components.core.essential import Role, Stage
  from .artifacts._base_type import AT, MM, ArtifactDescribe, M, _ArtifactsType, _ArtifactType
label_desc: Use image node_id 1 to create a new WriterGenerator object  with example: obj = WriterGenerator(cpn, name, config, ctx, artifact_describe, apply_config)