code: def PublicAPI(*args, **kwargs):
      """Annotation for documenting public APIs. Public APIs are classes and methods exposed to end users of Ludwig.
  
      If stability="stable", the APIs will remain backwards compatible across minor Ludwig releases
      (e.g., Ludwig 0.6 -> Ludwig 0.7).
  
      If stability="experimental", the APIs can be used by advanced users who are tolerant to and expect
      breaking changes. This will likely be seen in the case of incremental new feature development.
  
      Args:
          stability: One of {"stable", "experimental"}
  
      Examples:
          >>> from api_annotations import PublicAPI
          >>> @PublicAPI
          ... def func1(x):
          ...     return x
          >>> @PublicAPI(stability="experimental")
          ... def func2(y):
          ...     return y
      """
      if len(args) == 1 and len(kwargs) == 0 and callable(args[0]):
          return PublicAPI(stability="stable")(args[0])
  
      if "stability" in kwargs:
          stability = kwargs["stability"]
          assert stability in ["stable", "experimental"], stability
      elif kwargs:
          raise ValueError(f"Unknown kwargs: {kwargs.keys()}")
      else:
          stability = "stable"
  
      def wrap(obj):
          if stability == "experimental":
              message = f"PublicAPI ({stability}): This API is {stability} and may change before becoming stable."
          else:
              message = "PublicAPI: This API is stable across Ludwig releases."
  
          _append_doc(obj, message=message)
          _mark_annotated(obj)
          return obj
  
      return wrap
  
file_path: ludwig/ludwig/api_annotations.py
imports: from typing import Optional
label_desc: Use image node_id 1 for calling a global function with example usage: PublicAPI() and returns: wrap, PublicAPI, obj