def populate_metadata(model, MetadataClass):
    """
    For a given model and metadata class, ensure there is metadata for
    every instance.
    """
    for instance in model.objects.all():
        create_metadata_instance(MetadataClass, instance)