def add_test_run_metadata(meta_dict, test_run_id, session=None):
    metadata = []
    for key, value in meta_dict.items():
        meta = models.TestRunMetadata()
        meta.key = key
        meta.value = value
        meta.test_run_id = test_run_id
        session = session or get_session()
        with session.begin():
            session.add(meta)
        metadata.append(meta)
    return metadata
JRPC method that permits adding a new rule (with the given configuration)
dataset/ETHPy150Open openstack-infra/subunit2sql/subunit2sql/db/api.py/add_test_run_metadata--crossover with--dataset/ETHPy150Open satnet-project/server/services/configuration/jrpc/views/rules.py/add_rule