<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def GetArtifact(self, name):
 """Get artifact by name. Args: name: artifact name string. Returns: artifact object. Raises: ArtifactNotRegisteredError: if artifact doesn't exist in the registy. """

    self._CheckDirty()
    result = self._artifacts.get(name)
    if not result:
      raise rdf_artifacts.ArtifactNotRegisteredError(
          "Artifact %s missing from registry. You may need to sync the "
          "artifact repo by running make in the artifact directory." % name)
    return result