@staticmethod
def merge_codegen_params(old_params, args, mapping_tuples):
    """
        Merge any codegen params found in old_params and args.
        Return updated args

        :param old_params: List of Resilient Objects (normally result of calling customize_py.codegen_reload_data())
        :type old_params: List
        :param args: Namespace of all args passed from command line
        :type args: argparse.Namespace
        :param mapping_tuples: List of Tuples e.g. [("arg_name", "old_param_name")]
        :type mapping_tuples: List
        :return: The 'merged' args
        :rtype: argparse.Namespace
        """
    for m in mapping_tuples:
        all_obj_names_wanted = set()
        arg_name = m[0]
        old_param_name = m[1]
        arg = getattr(args, arg_name)
        if arg:
            all_obj_names_wanted = set(arg)
        setattr(args, arg_name, list(all_obj_names_wanted.union(set(
            old_params.get(old_param_name, [])))))
    return args
