code: def formatted_signature(name: str, params: list[str]) -> str:
      """
      Return a formatted signature of function/method
  
      Parameters
      ----------
      name :
          Name of function/method/class(for the __init__ method)
      params :
          Parameters to the function. A each parameter is a
          string. e.g. a, *args, *, /, b=2, c=3, **kwargs
      """
      # Format to a maximum width of 78 chars
      # It fails when a parameter declarations is longer than 78
      opening = f"{name}("
      params_string = ", ".join(params)
      closing = ")"
      pad = " " * 4
      if len(opening) + len(params_string) > 78:
          line_pad = f"\n{pad}"
          # One parameter per line
          if len(params_string) > 74:
              params_string = f",{line_pad}".join(params)
          params_string = f"{line_pad}{params_string}"
          closing = f"\n{closing}"
      sig = f"{opening}{params_string}{closing}"
      return sig
  
file_path: plotnine/doc/_renderers/format.py
imports: import re
  from functools import singledispatch
  import griffe.dataclasses
  import griffe.expressions
  from quartodoc.pandoc.components import Attr
  from quartodoc.pandoc.inlines import Span
label_desc: Use image node_id 11 for calling a global function with example usage: formatted_signature(name, params) and returns: sig