def extract_common_args(command, parser, cl_args):
try:<EOL><INDENT>cluster_role_env = cl_args['<STR_LIT>']<EOL>config_path = cl_args['<STR_LIT>']<EOL><DEDENT>except KeyError:<EOL><INDENT>subparser = config.get_subparser(parser, command)<EOL>print(subparser.format_help())<EOL>return dict()<EOL><DEDENT>cluster = config.get_heron_cluster(cluster_role_env)<EOL>config_path = config.get_heron_cluster_conf_dir(cluster, config_path)<EOL>new_cl_args = dict()<EOL>try:<EOL><INDENT>cluster_tuple = config.parse_cluster_role_env(cluster_role_env, config_path)<EOL>new_cl_args['<STR_LIT>'] = cluster_tuple[<NUM_LIT:0>]<EOL>new_cl_args['<STR_LIT>'] = cluster_tuple[<NUM_LIT:1>]<EOL>new_cl_args['<STR_LIT>'] = cluster_tuple[<NUM_LIT:2>]<EOL>new_cl_args['<STR_LIT>'] = config_path<EOL><DEDENT>except Exception as e:<EOL><INDENT>Log.error("<STR_LIT>", str(e))<EOL>return dict()<EOL><DEDENT>cl_args.update(new_cl_args)<EOL>return cl_args<EOL>
extract common args