code: def is_model_wrapped(cls_or_instance) -> bool:
      if not inspect.isclass(cls_or_instance):
          cls_or_instance = cls_or_instance.__class__
      return getattr(cls_or_instance, "_nni_model_wrapper", False)
  
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 6 for calling a global function with example usage: is_model_wrapped(cls_or_instance) and returns: getattr