code: def render_safely(func):
      """
      This is a decorator that can be added to any `MetaflowCardComponent.render`
      The goal is to render subcomponents safely and ensure that they are JSON serializable.
      """
  
      # expects a renderer func
      def ret_func(self, *args, **kwargs):
          return _render_component_safely(
              self, func, True, *args, **kwargs
          )
  
      return ret_func
  
imports: import traceback
  import json
  from .basic import SerializationErrorComponent
label_desc: Use image node_id 2 for calling a global function with example usage: render_safely(func) and returns: ret_func, _render_component_safely