def save_snapshot_match(
    b1_pk, b2_pk, confidence=None, user=None, match_type=None
):
    from seed.mappings import mapper as seed_mapper

    # No point in linking the same building together.
    if b1_pk == b2_pk:
        return

    b1 = BuildingSnapshot.objects.get(pk=b1_pk)
    b2 = BuildingSnapshot.objects.get(pk=b2_pk)

    # we don't want to match in the middle of the tree, so get the tip
    b1 = b1.tip
    b2 = b2.tip

    new_snapshot = BuildingSnapshot.objects.create()
    new_snapshot = seed_mapper.merge_building(
        new_snapshot,
        b1,
        b2,
        seed_mapper.get_building_attrs([b1, b2]),
        conf=confidence,
        match_type=match_type
    )

    clean_canonicals(b1, b2, new_snapshot)

    new_snapshot.last_modified_by = user

    new_snapshot.meters.add(*b1.meters.all())
    new_snapshot.meters.add(*b2.meters.all())
    new_snapshot.super_organization = b1.super_organization
    new_snapshot.super_organization = b2.super_organization

    new_snapshot.save()

    return new_snapshot
Creates or overwrites blobs.
dataset/ETHPy150Open buildingenergy/buildingenergy-platform/seed/models.py/save_snapshot_match--crossover with--dataset/ETHPy150Open google/grr/grr/lib/blob_store.py/Blobstore.StoreBlobs