def METHOD_NAME(futures, lithops_executor):
    if mp_config.get_parameter(mp_config.EXPORT_EXECUTION_DETAILS):
        try:
            path = os.path.realpath(mp_config.get_parameter(mp_config.EXPORT_EXECUTION_DETAILS))
            job_id = futures[0].job_id
            plots_file_name = '{}_{}'.format(lithops_executor.executor_id, job_id)
            lithops_executor.plot(fs=futures, dst=os.path.join(path, plots_file_name))
            stats = {fut.call_id: fut.stats for fut in futures}
            stats_file_name = '{}_{}_stats.json'.format(lithops_executor.executor_id, job_id)
            with open(os.path.join(path, stats_file_name), 'w') as stats_file:
                stats_json = json.dumps(stats, indent=4)
                stats_file.write(stats_json)
        except Exception as e:
            logger.error('Error while exporting execution results: {}\n{}'.format(e, traceback.format_exc()))