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

def union(self, second_iterable, selector=identity):
        '''Returns those elements which are either in the source sequence or in
        the second_iterable, or in both.

        Note: This method uses deferred execution.

        Args:
            second_iterable: Elements from this sequence are returns if they
                are not also in the source sequence.

            selector: An optional single argument function which is used to
                project the elements in the source and second_iterables prior
                to comparing them. If omitted the identity function will be
                used.

        Returns:
            A sequence containing all elements in the source sequence and second
            sequence.

        Raises:
            ValueError: If the Queryable has been closed.
            TypeError: If the second_iterable is not in fact iterable.
            TypeError: If the selector is not callable.
        '''
        if self.closed():
            raise ValueError("Attempt to call union() on a closed Queryable.")

        if not is_iterable(second_iterable):
            raise TypeError("Cannot compute union() with second_iterable of "
                  "non-iterable {0}".format(str(type(second_iterable))[7: -1]))

        return self._create(itertools.chain(self, second_iterable)).distinct(selector)