<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _line_format(line):
 """Determine the column format pattern for a line in an ASCII segment file. """

    for pat in (FOUR_COL_REGEX, THREE_COL_REGEX, TWO_COL_REGEX):
        if pat.match(line):
            return pat
    raise ValueError("unable to parse segment from line {!r}".format(line))