<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def reverse_fd(inf, outf):
    '''Reverse the content of inf, write to outf.
    Both inf and outf are file objects.
    inf must be seekable.
    '''
    inf.seek(0, 2)
    size = inf.tell()
    if not size:
        return

    chunks = split_size(size)
    for chunk in reversed(chunks):
        inf.seek(chunk[0], 0)
        data = inf.read(chunk[1])
        if len(data) != chunk[1]:
            raise IOError('incomplete I/O operation')
        outf.write(data[::-1])