def isAmbivalent(self, dim=None):
        """
        Return True if any of the factors are in fact tuples.
        If a dimension name is given only that dimension is tested.
        ::
            >>> l = Location(pop=1)
            >>> l.isAmbivalent()
            False
            >>> l = Location(pop=1, snap=(100, -100))
            >>> l.isAmbivalent()
            True
        """
        if dim is not None:
            try:
                return type(self[dim]) == TupleType
            except __HOLE__:
                # dimension is not present, it should be 0, so not ambivalent
                return False
        for dim, val in self.items():
            if type(val) == TupleType:
                return True
        return False
dataset/ETHPy150Open LettError/MutatorMath/Lib/mutatorMath/objects/location.py/Location.isAmbivalent