code: def _render_card_component(component):
      if not _component_is_valid(component):
          return None
      try:
          rendered_obj = component.render()
      except:
          return None
      else:
          if not (
              type(rendered_obj) == str or type(rendered_obj) == dict
          ):
              return None
          else:
              # Since `UserComponent`s are safely_rendered using render_tools.py
              # we don't need to check JSON serialization as @render_tools.render_safely
              # decorator ensures this check so there is no need to re-serialize
              if not issubclass(type(component), UserComponent):
                  try:  # check if rendered object is json serializable.
                      json.dumps(rendered_obj)
                  except (TypeError, OverflowError) as e:
                      return None
          return rendered_obj
  
imports: from .card_modules import MetaflowCardComponent
  from .card_modules.basic import ErrorComponent, SectionComponent
  from .card_modules.components import UserComponent, create_component_id, StubComponent
  from .exception import ComponentOverwriteNotSupportedException
  from metaflow.metaflow_config import RUNTIME_CARD_RENDER_INTERVAL
  import uuid
  import json
  import platform
  from collections import OrderedDict
  import time
label_desc: Use image node_id 5 for calling a global function with example usage: _render_card_component(component) and returns: None, rendered_obj, None, None, None