Squeezing or expanding 2 fingers on this UI with given motion range and duration.

        Args:
            direction (:py:obj:`str`): pinching direction, only "in" or "out". "in" for squeezing, "out" for expanding
            percent (:py:obj:`float`): squeezing range from or expanding range to of the bounds of the UI
            duration (:py:obj:`float`): time interval in which the action is performed
            dead_zone (:py:obj:`float`): pinching inner circle radius. should not be greater than ``percent``

        Raises:
            PocoNoSuchNodeException: raised when the UI element does not exist

def pinch(self, direction='in', percent=0.6, duration=2.0, dead_zone=0.1):
        """
        Squeezing or expanding 2 fingers on this UI with given motion range and duration.

        Args:
            direction (:py:obj:`str`): pinching direction, only "in" or "out". "in" for squeezing, "out" for expanding
            percent (:py:obj:`float`): squeezing range from or expanding range to of the bounds of the UI
            duration (:py:obj:`float`): time interval in which the action is performed
            dead_zone (:py:obj:`float`): pinching inner circle radius. should not be greater than ``percent``

        Raises:
            PocoNoSuchNodeException: raised when the UI element does not exist
        """

        if direction not in ('in', 'out'):
            raise ValueError('Argument `direction` should be one of "in" or "out". Got {}'.format(repr(direction)))
        if dead_zone >= percent:
            raise ValueError('Argument `dead_zone` should not be greater than `percent`. dead_zoon={}, percent={}'
                             .format(repr(dead_zone), repr(percent)))

        w, h = self.get_size()
        x, y = self.get_position()
        # focus = self._focus or [0.5, 0.5]
        tracks = make_pinching(direction, [x, y], [w, h], percent, dead_zone, duration)
        speed = math.sqrt(w * h) * (percent - dead_zone) / 2 / duration

        # 速度慢的时候，精度适当要提高，这样有助于控制准确
        ret = self.poco.apply_motion_tracks(tracks, accuracy=speed * 0.03)
        return ret