code: def serialize_cls(cls):
      """
      To create an serializable class.
      """
      warnings.warn(
          "nni.retiarii.serialize is deprecated and will be removed in future release. "
          + "Try to use nni.trace instead.",
          category=DeprecationWarning,
      )
      return trace(cls)
  
file_path: nni/nni/nas/utils/_legacy.py
imports: import inspect
  import os
  import warnings
  from typing import Any, TypeVar, Type
  from nni.common.serializer import is_traceable, is_wrapped_with_trace, trace
label_desc: Use image node_id 3 for calling a global function with example usage: serialize_cls(cls) and returns: trace