code: def warn(
      msg: str,
      category: t.Any,
      *,
      stacklevel: int,
      source: t.Any = None,
  ) -> None:
      """Like warnings.warn(), but category and stacklevel are required.
  
      You pretty much never want the default stacklevel of 1, so this helps
      encourage setting it explicitly."""
      warnings.warn(
          msg, category=category, stacklevel=stacklevel, source=source
      )
  
file_path: catboost/contrib/python/traitlets/py3/traitlets/utils/warnings.py
imports: from __future__ import annotations
  import inspect
  import os
  import typing
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: warn(msg, category) without return types