docs: 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 isinstance(self[dim], tuple)
              except KeyError:
                  # dimension is not present, it should be 0, so not ambivalent
                  return False
          for dim, val in self.items():
              if isinstance(val, tuple):
                  return True
          return False