def _parse_conll_identifier(
    value: str, line: int, field: str, *, non_zero=False
) -> int:
    """Parse a CoNLL token identifier, raise the appropriate exception if it is invalid.
       Just propagate the exception if `value` does not parse to an integer.

       If `non_zero` is truthy, raise an exception if `value` is zero.
       `field` and `line` are only used for the error message."""
    res = int(value)
    if res < 0:
        raise ValueError(
            "At line {line}, the `{field}` field must be a non-negative integer, got {value!r}".format(
                line=line, field=field, value=value
            )
        )
    elif non_zero and res == 0:
        raise ValueError(
            "At line {line}, the `{field}` field must be a positive integer, got {value!r}".format(
                line=line, field=field, value=value
            )
        )
    return res