code: def register_pydantic_serializers(serialization_context):
      if not PYDANTIC_INSTALLED:
          return
  
      if IS_PYDANTIC_2:
          # TODO(edoakes): compare against the version that has the fixes.
          from pydantic.v1.fields import ModelField
      else:
          from pydantic.fields import ModelField
  
      # Pydantic's Cython validators are not serializable.
      # https://github.com/cloudpipe/cloudpickle/issues/408
      serialization_context._register_cloudpickle_serializer(
          ModelField,
          custom_serializer=lambda o: {
              "name": o.name,
              # outer_type_ is the original type for ModelFields,
              # while type_ can be updated later with the nested type
              # like int for List[int].
              "type_": o.outer_type_,
              "class_validators": o.class_validators,
              "model_config": o.model_config,
              "default": o.default,
              "default_factory": o.default_factory,
              "required": o.required,
              "alias": o.alias,
              "field_info": o.field_info,
          },
          custom_deserializer=lambda kwargs: ModelField(**kwargs),
      )
  
label_desc: Use image node_id 1 for calling a global function with example usage: register_pydantic_serializers(serialization_context) without return types