from typing import Dict
from typing import List


def combine_keys(data: Dict, new_schema: Dict[str, List[str]]) -> Dict:
    """
    複数のkeysの要素を結合して、new_keyを作る
    Args:
        data: Dict
            example: {"A": "val_a", "B": "val_b"}
        new_schema: Dict
            example: {"AB": ["A", "B"]}
    Returns:
        Dict:
            example: {"AB": "val_a val_b"}
    """
    output = {}
    for new_key, old_keys in new_schema.items():
        output[new_key] = " ".join([data[key] for key in old_keys])
    return output