You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: lib.rs
    path of file: ./repos/bottlerocket/sources/api/migration/migration-helpers/src
    
    the code of the file until where you have to start completion: //! This module aims to make it as easy as possible to migrate a data store between minor
//! versions.  Migration authors just implement one trait, and can then use helper methods to take
//! care of everything else in their main function.
//!
//! Note that you must still name your migration binary according to spec for it to be handled
//! properly by the migration runner.

// Note that migrations must be run serially; technically, this is because the data store isn't
// locked, and also because migration authors are given an interface for ordering via migration
// name, and running in parallel would violate that.

mod args;
pub mod common_migrations;
mod datastore_helper;
pub mod error;

use snafu::ResultExt;
use std::collections::HashMap;
use std::env;
use std::fmt;

use datastore::{Committed, Value};
pub use datastore::{DataStore, FilesystemDataStore};

use args::{parse_args, Args};
use
    
pub fn run_migration(mut migration: impl Migration, args: &Args) -> Result<()> {
    let source = DataStoreImplementation::new(&args.source_datastore);
    let mut target = DataStoreImplementation::new(&args.target_datastore);

    // Run for live data and for each pending transaction
    let mut committeds = vec![Committed::Live];
    let transactions = source
        .list_transactions()
        .context(error::ListTransactionsSnafu)?;
    committeds.extend(transactions.into_iter().map(|tx| Committed::Pending { tx }));

    for committed in committeds {
        let input = get_input_data(&source, &committed)?;

        let mut migrated = input.clone();
        migrated = match args.migration_type {
            MigrationType::Forward => migration.forward(migrated),
            MigrationType::Backward => migration.backward(migrated),
        }?;

        validate_migrated_data(&migrated)?;

        set_output_data(&mut target, &migrated, &committed)?;
    }
    Ok(())
}