<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def id(self):
 """A unique, stable, hashable id over the set of pinned artifacts."""

    if not self._id:
      # NB(gmalmquist): This id is not cheap to compute if there are a large number of artifacts.
      # We cache it here, but invalidate the cached value if an artifact gets added or changed.
      self._id = tuple(sorted(map(str, self)))
    return self._id