code: def _pipe_segment_with_colons(align, colwidth):
      """Return a segment of a horizontal line with optional colons which
      indicate column's alignment (as in `pipe` output format)."""
      w = colwidth
      if align in ["right", "decimal"]:
          return ("-" * (w - 1)) + ":"
      elif align == "center":
          return ":" + ("-" * (w - 2)) + ":"
      elif align == "left":
          return ":" + ("-" * (w - 1))
      else:
          return "-" * w
  
imports: from __future__ import print_function
  from __future__ import unicode_literals
  from collections import namedtuple
  from platform import python_version_tuple
  import re
label_desc: Use image node_id 1 for calling a global function with example usage: _pipe_segment_with_colons(align, colwidth) and returns: unknown, unknown, unknown, unknown