code: def profiler_leaf_module(mod: ModuleType) -> ModuleType:
      """Register a module as a leaf module for profiler.
  
      Examples
      --------
      >>> @profiler_leaf_module
      >>> class MyFancyModule(nn.Module):
      ...     pass
      """
      _leaf_registry.append(mod)
      return mod
  
file_path: nni/nni/nas/profiler/pytorch/utils/misc.py
imports: from __future__ import annotations
  from typing import Any, Callable, TypeVar, Type
  from torch import nn
  from nni.nas.nn.pytorch import ParametrizedModule
label_desc: Use image node_id 4 for calling a global function with example usage: profiler_leaf_module(mod) and returns: mod