code: def save_result(result, output):
      logger.info(f"Result: {json.dumps(result)}")
      if output:
          with open(output, "w") as fp:
              json.dump(result, fp, indent=2)
  
file_path: MONAILabel/monailabel/interfaces/utils/app.py
imports: import argparse
  import json
  import logging
  import os
  from typing import Any, Dict
  from monailabel.config import settings
  from monailabel.interfaces.exception import MONAILabelError, MONAILabelException
  from monailabel.utils.others.class_utils import get_class_of_subclass_from_file
label_desc: Use image node_id 3 for calling a global function with example usage: save_result(result, output) without return types