def calculate_infixop(self, node, previous, next_node):
        """Create new node for infixop"""
        previous_position = (previous.last_line, previous.last_col - 1)
        position = (next_node.first_line, next_node.first_col + 1)
        possible = []
        for ch in OPERATORS[node.__class__]:
            try:
                pos = self.operators[ch].find_previous(position)
                if previous_position < pos[1] < position:
                    possible.append(pos)
            except KeyError:
                pass

        if not possible:
            raise ValueError("not a single {} between {} and {}".format(
                OPERATORS[node.__class__], previous_position, position))

        return NodeWithPosition(
            *min(possible, key=lambda x: tuple(map(sub, position, x[0])))
        )
Create new node for infixop