def _line_segment_with_colons(linefmt, align, colwidth):
fill = linefmt.hline<EOL>w = colwidth<EOL>if align in ["<STR_LIT:right>", "<STR_LIT>"]:<EOL><INDENT>return (fill[<NUM_LIT:0>] * (w - <NUM_LIT:1>)) + "<STR_LIT::>"<EOL><DEDENT>elif align == "<STR_LIT>":<EOL><INDENT>return "<STR_LIT::>" + (fill[<NUM_LIT:0>] * (w - <NUM_LIT:2>)) + "<STR_LIT::>"<EOL><DEDENT>elif align == "<STR_LIT:left>":<EOL><INDENT>return "<STR_LIT::>" + (fill[<NUM_LIT:0>] * (w - <NUM_LIT:1>))<EOL><DEDENT>else:<EOL><INDENT>return fill[<NUM_LIT:0>] * w<EOL><DEDENT>
Return a segment of a horizontal line with optional colons which
    indicate column's alignment (as in `pipe` output format).