<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_quota(outbytes: int, outfn: Path) -> Union[None, int]: """ aborts writing if not enough space on drive to write """

    if not outfn:
        return None

    anch = Path(outfn).resolve().anchor
    freeout = shutil.disk_usage(anch).free

    if freeout < 10 * outbytes:
        raise IOError(f'out of disk space on {anch}.'
                      '{freeout/1e9} GB free, wanting to write {outbytes/1e9} GB.')

    return freeout