code: def format_signature(string, maxlen=77):
      """Format the signature of the function, with line breaks after
      `maxlen + 3` characters."""
      line, *elements = string.split(", ")
      lines = []
      while elements:
          elem, *elements = elements
          if len(line) + len(elem) < maxlen:
              line = "{0}, {1}".format(line, elem)
          else:
              lines.append("{0},".format(line))
              line = "    {0}".format(elem)
      if line:
          lines.append(line)
      return "```python\n{0}\n```".format("\n".join(lines))
  
file_path: pytorch-meta/docs/scripts/api_reference.py
imports: import importlib
  import inspect
  import re
  import yaml
  import logging
  import torch.nn
label_desc: Use image node_id 1 for calling a global function with example usage: format_signature(string, maxlen) and returns: str