<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def link_for_image(self, base_dir: str, conf: Config) -> int: """Link all artifacts required for a Docker image under `base_dir` and return the number of linked artifacts."""

        return self.link_types(
            base_dir,
            [ArtifactType.app, ArtifactType.binary, ArtifactType.gen_py],
            conf)