code: def warning_format(
      message: Union[Warning, str],
      category: Type[Warning],
      filename: str,
      lineno: int,
      line: Optional[str] = None,
  ) -> str:
      """
      Format for plotnine warnings
      """
      fmt = "{}:{}: {}: {}\n".format
      return fmt(filename, lineno, category.__name__, message)
  
file_path: plotnine/plotnine/exceptions.py
imports: from __future__ import annotations
  import warnings
  from textwrap import dedent
  from typing import Optional, Type, Union
label_desc: Use image node_id 1 for calling a global function with example usage: warning_format(message, category, filename, lineno, line) and returns: fmt