code: def display_fraction(digits, *, skip=0, colwidth=10, columns=5):
      """Pretty printer for first n digits of a fraction"""
      perline = colwidth * columns
      printed = 0
      for linecount in range(
          (len(digits) - skip) // (colwidth * columns)
      ):
          line = digits[
              skip
              + linecount * perline : skip
              + (linecount + 1) * perline
          ]
          for i in range(columns):
              print(
                  line[i * colwidth : (i + 1) * colwidth],
              )
          print(":", (linecount + 1) * perline)
          if (linecount + 1) % 10 == 0:
              print()
          printed += colwidth * columns
      rem = (len(digits) - skip) % (colwidth * columns)
      if rem:
          buf = digits[-rem:]
          s = ""
          for i in range(columns):
              s += buf[:colwidth].ljust(colwidth + 1, " ")
              buf = buf[colwidth:]
          print(s + ":", printed + colwidth * columns)
  
file_path: sympy/examples/advanced/pidigits.py
imports: from mpmath import libmp, pi
  import math
  import sys
  from time import perf_counter
label_desc: Use image node_id 1 for calling a global function with example usage: display_fraction(digits) without return types