code: def get_func_kwargs(
      metadata: Optional[List[Dict[str, Any]]],
      local_kwargs: Dict[str, Any],
      **kwargs,
  ) -> Dict[str, Any]:
      if metadata is None:
          return {}
  
      bboxes = local_kwargs.pop("bboxes", None)
      bboxes = (
          bboxes
          if len(metadata) == 0
          else metadata[-1].get("dst_bboxes", None)
      )
  
      func_kwargs = deepcopy(local_kwargs)
      func_kwargs.pop("metadata")
  
      if bboxes is not None:
          func_kwargs["src_bboxes"] = deepcopy(bboxes)
          func_kwargs["dst_bboxes"] = deepcopy(bboxes)
      func_kwargs.update(**deepcopy(kwargs))
  
      return func_kwargs
  
file_path: AugLy/augly/image/utils/metadata.py
imports: from copy import deepcopy
  from typing import Any, Callable, Dict, List, Optional, Tuple
  from augly.image import intensity
  from augly.image.utils import bboxes
  from PIL import Image
label_desc: Use image node_id 6 for calling a global function with example usage: get_func_kwargs(metadata, local_kwargs) and returns: func_kwargs, dict