@staticmethod
def filter_empty_items(items):
    """
        Filter out items that give False when casted to boolean.

        :argument items: List of tuples
        :type items: iterable

        :returns: List of URL part specs (with empty items cleared out)
        :rtype: list of tuple

        >>> list(URLBuilder.filter_empty_items([
        ...   (None, ''),
        ...   (None, '<not empty>'),
        ...   (None, []),
        ...   (None, None),
        ...   (None, '<not empty 2>'),
        ... ]))
        [(None, '<not empty>'), (None, '<not empty 2>')]

        >>> list(URLBuilder.filter_empty_items([
        ...   (None, '<not empty>'),
        ...   None
        ... ]))
        Traceback (most recent call last):
          ...
        TypeError: 'NoneType' object is not iterable

        """
    for required, item in items:
        if item:
            yield required, item
