class_docstr: Base class in ``setuptools`` warning hierarchy.
class_docstr_tok: ["Base","class","in","``","setuptools","``","warning","hierarchy","."]
docstr: Private: reserved for ``setuptools`` internal use only
docstr_tok: ["Private",":","reserved","for","``","setuptools","``","internal","use","only"]
code: def _format(
      cls,
      summary: str,
      details: str,
      due_date: Optional[date] = None,
      see_url: Optional[str] = None,
      format_args: Optional[dict] = None,
  ):
      """Private: reserved for ``setuptools`` internal use only"""
      today = date.today()
      summary = cleandoc(summary).format_map(format_args or {})
      possible_parts = [
          cleandoc(details).format_map(format_args or {}),
          (
              f"\nBy {due_date:%Y-%b-%d}, you need to update your project and remove "
              "deprecated calls\nor your builds will no longer be supported."
              if due_date and due_date > today
              else None
          ),
          (
              "\nThis deprecation is overdue, please update your project and remove "
              "deprecated\ncalls to avoid build errors in the future."
              if due_date and due_date < today
              else None
          ),
          (f"\nSee {see_url} for details." if see_url else None),
      ]
      parts = [x for x in possible_parts if x]
      if parts:
          body = indent(
              _TEMPLATE.format(details="\n".join(parts)), _INDENT
          )
          return "\n".join([summary, "!!\n", body, "\n!!"])
      return summary
  
file_path: catboost/contrib/python/setuptools/py3/setuptools/warnings.py
imports: import os
  import warnings
  from datetime import date
  from inspect import cleandoc
  from textwrap import indent
  from typing import Optional, Tuple
label_desc: Use image node_id 2 for calling the SetuptoolsWarning obj's underlying member method code with example usage: obj._format(cls, summary, details, due_date, see_url, format_args) and returns: summary, str