code: def format_argspec(argspec):
      """Format argspect, convenience wrapper around inspect's.
  
      This takes a dict instead of ordered arguments and calls
      inspect.format_argspec with the arguments in the necessary order.
  
      DEPRECATED (since 7.10): Do not use; will be removed in future versions.
      """
  
      warnings.warn(
          "`format_argspec` function is deprecated as of IPython 7.10"
          "and will be removed in future versions.",
          DeprecationWarning,
          stacklevel=2,
      )
  
      return inspect.formatargspec(
          argspec["args"],
          argspec["varargs"],
          argspec["varkw"],
          argspec["defaults"],
      )
  
imports: from dataclasses import dataclass
  from inspect import signature
  from textwrap import dedent
  import ast
  import html
  import inspect
  import io
  import linecache
  import os
  import sys
  import types
  import warnings
  from typing import Any, Optional, Dict, Union, List, Tuple
  from typing import TypeAlias
  from IPython.core import page
  from IPython.lib.pretty import pretty
  from IPython.testing.skipdoctest import skip_doctest
  from IPython.utils import PyColorize
  from IPython.utils import openpy
  from IPython.utils.dir2 import safe_hasattr
  from IPython.utils.path import compress_user
  from IPython.utils.text import indent
  from IPython.utils.wildcard import list_namespace
  from IPython.utils.wildcard import typestr2type
  from IPython.utils.coloransi import TermColors, ColorScheme, ColorSchemeTable
  from IPython.utils.py3compat import cast_unicode
  from IPython.utils.colorable import Colorable
  from IPython.utils.decorators import undoc
  from pygments import highlight
  from pygments.lexers import PythonLexer
  from pygments.formatters import HtmlFormatter
label_desc: Use image node_id 8 for calling a global function with example usage: format_argspec(argspec) and returns: inspect