def odoo_tuple_in(iterable):
    """Return `True` if `iterable` contains an expected tuple like
    ``(6, 0, IDS)`` (and so on).

        >>> odoo_tuple_in([0, 1, 2])        # Simple list
        False
        >>> odoo_tuple_in([(6, 0, [42])])   # List of tuples
        True
        >>> odoo_tuple_in([[1, 42]])        # List of lists
        True
    """
    if not iterable:
        return False
    def is_odoo_tuple(elt):
        """Return `True` if `elt` is a Odoo special tuple."""
        try:
            return elt[:1][0] in [1, 2, 3, 4, 5] \
                    or elt[:2] in [(6, 0), [6, 0], (0, 0), [0, 0]]
        except (TypeError, IndexError):
            return False
    return any(is_odoo_tuple(elt) for elt in iterable)
def odoo_tuple_in ( iterable ) : if not iterable : return False def is_odoo_tuple ( elt ) : try : return elt [ : 1 ] [ 0 ] in [ 1 , 2 , 3 , 4 , 5 ] or elt [ : 2 ] in [ ( 6 , 0 ) , [ 6 , 0 ] , ( 0 , 0 ) , [ 0 , 0 ] ] except ( TypeError , IndexError ) : return False return any ( is_odoo_tuple ( elt ) for elt in iterable )
Return `True` if `iterable` contains an expected tuple like
    ``(6, 0, IDS)`` (and so on).

        >>> odoo_tuple_in([0, 1, 2])        # Simple list
        False
        >>> odoo_tuple_in([(6, 0, [42])])   # List of tuples
        True
        >>> odoo_tuple_in([[1, 42]])        # List of lists
        True