docstr: Build a flow stage, which is a sequence of flow steps.
  Each flow stage is essentially a sequence of `flow_steps` Glow blocks (`AllInOneBlock`).
  
  Args:
      in_node (ff.Node): Input node.
      flow_steps (int): Number of flow steps.
      condition_node (ff.Node): Condition node.
  
  Returns:
      List[ff.Node]: List of flow steps.
docstr_tok: ["Build","a","flow","stage",",","which","is","a","sequence","of","flow","steps",".","Each","flow","stage","is","essentially","a","sequence","of","`","flow_steps","`","Glow","blocks","(","`","AllInOneBlock","`",")",".","Args",":","in_node","(","ff.Node",")",":","Input","node",".","flow_steps","(","int",")",":","Number","of","flow","steps",".","condition_node","(","ff.Node",")",":","Condition","node",".","Returns",":","List","[","ff.Node","]",":","List","of","flow","steps","."]
code: def build_flow_stage(
      self,
      in_node: ff.Node,
      flow_steps: int,
      condition_node: ff.Node = None,
  ) -> list[ff.Node]:
      """
      Build a flow stage, which is a sequence of flow steps.
      Each flow stage is essentially a sequence of `flow_steps` Glow blocks (`AllInOneBlock`).
  
      Args:
          in_node (ff.Node): Input node.
          flow_steps (int): Number of flow steps.
          condition_node (ff.Node): Condition node.
  
      Returns:
          List[ff.Node]: List of flow steps.
      """
  
      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
  
file_path: anomalib/src/anomalib/models/uflow/torch_model.py
imports: import torch.nn
  from FrEIA import framework
  from FrEIA import modules
  from anomalib.models.components.flow import AllInOneBlock
  from .anomaly_map import AnomalyMapGenerator
  from .feature_extraction import get_feature_extractor
label_desc: Use image node_id 3 for calling the UflowModel obj's underlying member method code with example usage: obj.build_flow_stage(in_node, flow_steps, condition_node) and returns: nodes