'Validating headers setter.'

def _set_headers(self, collection):

    self._validate(collection)
    if collection:
        try:
            self.__headers = list(collection)
        except TypeError:
            raise TypeError
    else:
        self.__headers = None
