def limit_data(data_dict: dict, limit: int = -1) -> dict:
    """apply limitation to data set

    Args:
        data_dict (dict): set with source and target
        limit (int, optional): limit of data to process.
        Defaults to -1.

    Returns:
        [dict]: dict with limited source and target
    """
    if limit == -1:
        return data_dict

    new_dict = dict()
    for item in ["source", "target"]:
        new_dict[item] = {
            "input_ids": data_dict[item]['input_ids'][:limit],
            "attention_mask": data_dict[item]['attention_mask'][:limit]
        }
    return new_dict