import copy


def get_relation_record(relation_set, dataset):
    """
    get records from dataset by record_id set
    """
    relation_records = []
    for loc in relation_set:
        r = dataset[loc.filename][loc.record_id]
        relation_records.append(copy.copy(r))
    # new_relation_records = copy.deepcopy(relation_records)
    return relation_records