<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_target_artifact_metadata(self, target: str, metadata: dict):
 """Register the artifact metadata dictionary for a built target."""

        with self.context_lock:
            self.artifacts_metadata[target.name] = metadata