class_docstr: An artifact.
class_docstr_tok: ["An","artifact","."]
code: def __post_init__(self) -> None:
      if self.processing_step.input_type == "dataset":
          if self.config is not None or self.split is not None:
              raise ValueError(
                  "Step input type is dataset, but config or split is not None"
              )
      elif self.processing_step.input_type == "config":
          if self.config is None or self.split is not None:
              raise ValueError(
                  "Step input type is config, but config is None or split is not None"
              )
      elif self.processing_step.input_type == "split":
          if self.config is None or self.split is None:
              raise ValueError(
                  "Step input type is split, but config or split is None"
              )
      else:
          raise ValueError(
              f"Invalid step input type: {self.processing_step.input_type}"
          )
      self.id = Artifact.get_id(
          dataset=self.dataset,
          revision=self.revision,
          config=self.config,
          split=self.split,
          processing_step_name=self.processing_step.name,
      )
  
imports: from __future__ import annotations
  from collections.abc import Mapping
  from dataclasses import dataclass, field
  from typing import Any, Literal, Optional, TypedDict, Union, get_args
  import networkx
  from libcommon.constants import DEFAULT_DIFFICULTY, DEFAULT_INPUT_TYPE, DEFAULT_JOB_RUNNER_VERSION, MIN_BYTES_FOR_BONUS_DIFFICULTY
  from libcommon.utils import inputs_to_string
label_desc: Use image node_id 1 for calling the Artifact obj's underlying member method code with example usage: obj.__post_init__() without return types