def _AddURNToCollection(self, urn, collection_urn):
    # TODO(user): Change to use StaticAdd once all active hunts are
    # migrated.
    try:
      aff4.FACTORY.Open(collection_urn,
                        "UrnCollection",
                        mode="rw",
                        token=self.token).Add(urn)
    except __HOLE__:
      aff4_collections.PackedVersionedCollection.AddToCollection(
          collection_urn, [urn], sync=False, token=self.token)
dataset/ETHPy150Open google/grr/grr/lib/hunts/implementation.py/GRRHunt._AddURNToCollection