def build_flow_stage(self, in_node: ff.Node, flow_steps: int, condition_node: ff.Node = None) -> list[ff.Node]:
        """Build a single flow stage consisting of multiple coupling layers.

        Each flow stage is a sequence of ``flow_steps`` Glow-style coupling blocks
        (``AllInOneBlock``). The blocks alternate between 3x3 and 1x1 convolutions
        in their coupling subnets.

        Args:
            in_node (ff.Node): Input node to the flow stage.
            flow_steps (int): Number of coupling layers to use.
            condition_node (ff.Node, optional): Optional conditioning node.
                Defaults to ``None``.

        Returns:
            list[ff.Node]: List of constructed coupling layer nodes.

        See Also:
            - :class:`AllInOneBlock`: Individual coupling layer implementation
            - :class:`AffineCouplingSubnet`: Subnet used in coupling layers
        """
        flow_size = in_node.output_dims[0][-1]
        nodes = []
        for step in range(flow_steps):
            nodes.append(
                ff.Node(
                    in_node,
                    AllInOneBlock,
                    module_args={
                        "subnet_constructor": AffineCouplingSubnet(
                            3 if step % 2 == 0 else 1,
                            self.affine_subnet_channels_ratio,
                        ),
                        "affine_clamping": self.affine_clamp,
                        "permute_soft": self.permute_soft,
                    },
                    conditions=condition_node,
                    name=f"flow{flow_size}_step{step}",
                ),
            )
            in_node = nodes[-1]
        return nodes
Build a single flow stage consisting of multiple coupling layers.

        Each flow stage is a sequence of ``flow_steps`` Glow-style coupling blocks
        (``AllInOneBlock``). The blocks alternate between 3x3 and 1x1 convolutions
        in their coupling subnets.

        Args:
            in_node (ff.Node): Input node to the flow stage.
            flow_steps (int): Number of coupling layers to use.
            condition_node (ff.Node, optional): Optional conditioning node.
                Defaults to ``None``.

        Returns:
            list[ff.Node]: List of constructed coupling layer nodes.

        See Also:
            - :class:`AllInOneBlock`: Individual coupling layer implementation
            - :class:`AffineCouplingSubnet`: Subnet used in coupling layers
        
src/anomalib/models/image/uflow/torch_model.py