code: def register_starlette_serializer(serialization_context):
      try:
          import starlette.datastructures
      except ImportError:
          return
  
      # Starlette's app.state object is not serializable
      # because it overrides __getattr__
      serialization_context._register_cloudpickle_serializer(
          starlette.datastructures.State,
          custom_serializer=lambda s: s._state,
          custom_deserializer=lambda s: starlette.datastructures.State(
              s
          ),
      )
  
label_desc: Use image node_id 1 for calling a global function with example usage: register_starlette_serializer(serialization_context) without return types