def write_stream (stream, holders, defaultsection=None, extrapos=(), sha1sum=False, **kwargs):
    """`extrapos` is basically a hack for multi-step processing. We have some flux
    measurements that are computed from luminosities and distances. The flux
    value is therefore an unwrapped Uval, which doesn't retain memory of any
    positivity constraint it may have had. Therefore, if we write out such a
    value using this routine, we may get something like `fx:u = 1pm1`, and the
    next time it's read in we'll get negative fluxes. Fields listed in
    `extrapos` will have a "P" constraint added if they are imprecise and
    their typetag is just "f" or "u".

    """
    if sha1sum:
        import hashlib
        sha1 = hashlib.sha1 ()
    else:
        sha1 = None

    inifile.write_stream (stream,
                          _format_many (holders, defaultsection, extrapos, sha1),
                          defaultsection=defaultsection,
                          **kwargs)

    if sha1sum:
        return sha1.digest ()
`extrapos` is basically a hack for multi-step processing. We have some flux
    measurements that are computed from luminosities and distances. The flux
    value is therefore an unwrapped Uval, which doesn't retain memory of any
    positivity constraint it may have had. Therefore, if we write out such a
    value using this routine, we may get something like `fx:u = 1pm1`, and the
    next time it's read in we'll get negative fluxes. Fields listed in
    `extrapos` will have a "P" constraint added if they are imprecise and
    their typetag is just "f" or "u".