'See `man 2 tee`
File-descriptors can be file-like objects with a `fileno` method, or
integers.
Flags can be an integer value, or a list of flags (exposed on
`splice`).
This function returns the number of bytes transferred (i.e. the actual
result of the call to `tee`).
Upon other errors, an `IOError` is raised with the proper `errno` set.'

def __call__(self, fd_in, fd_out, len_, flags):

    if (not self.available):
        raise EnvironmentError('tee    not    available')
    if (not isinstance(flags, six.integer_types)):
        c_flags = six.moves.reduce(operator.or_, flags, 0)
    else:
        c_flags = flags
    c_fd_in = getattr(fd_in, 'fileno', (lambda : fd_in))()
    c_fd_out = getattr(fd_out, 'fileno', (lambda : fd_out))()
    return self._c_tee(c_fd_in, c_fd_out, len_, c_flags)
