def METHOD_NAME(self, param, replacer, guest_id_mapping, host_id_mapping, multi=False):
    if multi:
        for binning_result in param.results:
            migrate_party_id = self.migrate_binning_result(binning_result, guest_id_mapping, host_id_mapping)
            if migrate_party_id is not None:
                binning_result.party_id = migrate_party_id
    else:
        migrate_party_id = self.migrate_binning_result(param.binning_result, guest_id_mapping, host_id_mapping)
        if migrate_party_id is not None:
            param.binning_result.party_id = migrate_party_id
    for host_binning_result in param.host_results:
        migrate_party_id = self.migrate_binning_result(host_binning_result, guest_id_mapping, host_id_mapping)
        if migrate_party_id is not None:
            host_binning_result.party_id = migrate_party_id
        kv_binning_result = dict(host_binning_result.binning_result)
        for col_name, iv_param in kv_binning_result.items():
            migrate_col_name = replacer.migrate_anonymous_header(col_name)
            host_binning_result.binning_result[migrate_col_name].CopyFrom(iv_param)
            del host_binning_result.binning_result[col_name]