def parse_complex(fid, N):
    """
    Parse *N* lines of complex number information (real component,
    imaginary component, and errors) found in *fid*. Return a list
    containing this information.
    """
    line1 = next(fid).decode('utf-8')
    assert line1 == '#              i  real          imag          real_error    imag_error\n'
    complex = []
    for i in range(N):
        line = next(fid).decode('utf-8')
        toks = line.split()
        assert len(toks) == 6
        complex.append(list(map(float, toks[2:])))
    return complex