code: def create_fast_flow_block(
      input_dimensions: list[int],
      conv3x3_only: bool,
      hidden_ratio: float,
      flow_steps: int,
      clamp: float = 2.0,
  ) -> SequenceINN:
      """Create NF Fast Flow Block.
  
      This is to create Normalizing Flow (NF) Fast Flow model block based on
      Figure 2 and Section 3.3 in the paper.
  
      Args:
          input_dimensions (list[int]): Input dimensions (Channel, Height, Width)
          conv3x3_only (bool): Boolean whether to use conv3x3 only or conv3x3 and conv1x1.
          hidden_ratio (float): Ratio for the hidden layer channels.
          flow_steps (int): Flow steps.
          clamp (float, optional): Clamp. Defaults to 2.0.
  
      Returns:
          SequenceINN: FastFlow Block.
      """
      nodes = SequenceINN(*input_dimensions)
      for i in range(flow_steps):
          if i % 2 == 1 and not conv3x3_only:
              kernel_size = 1
          else:
              kernel_size = 3
          nodes.append(
              AllInOneBlock,
              subnet_constructor=subnet_conv_func(
                  kernel_size, hidden_ratio
              ),
              affine_clamping=clamp,
              permute_soft=False,
          )
      return nodes
  
file_path: anomalib/src/anomalib/models/fastflow/torch_model.py
imports: from __future__ import annotations
  from typing import Callable
  import timm
  import torch
  from FrEIA.framework import SequenceINN
  from timm.models.cait import Cait
  from timm.models.vision_transformer import VisionTransformer
  from torch import Tensor, nn
  from anomalib.models.components.flow import AllInOneBlock
  from anomalib.models.fastflow.anomaly_map import AnomalyMapGenerator
label_desc: Use image node_id 2 for calling a global function with example usage: create_fast_flow_block(input_dimensions, conv3x3_only, hidden_ratio, flow_steps, clamp) and returns: nodes