'Get artifact by name.
Args:
name: artifact name string.
Returns:
artifact object.
Raises:
ArtifactNotRegisteredError: if artifact doesn\'t exist in the registy.'

def GetArtifact(self, name):

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