code: def apply(func, args, kwargs=None):
      if kwargs:
          return func(*args, **kwargs)
      return func(*args)
  
file_path: lightning-flash/src/flash/core/serve/dag/utils.py
imports: import functools
  import re
  from operator import methodcaller
  from flash.core.utilities.imports import _TOPIC_SERVE_AVAILABLE
label_desc: Use image node_id 3 for calling a global function with example usage: apply(func, args, kwargs) and returns: func, func