code: def pad(s, width, align):
      """Return string padded with spaces,
      based on alignment parameter."""
      if align == "l":
          s = s.ljust(width)
      elif align == "r":
          s = s.rjust(width)
      else:
          s = s.center(width)
      return s
  
imports: from statsmodels.compat.python import lmap, lrange
  from itertools import cycle, zip_longest
  import csv
label_desc: Use image node_id 2 for calling a global function with example usage: pad(s, width, align) and returns: s