code: def make_fusion_layer(method: str, feature_dims: List[int]):
      """
      Args:
          method (str): the fusion method to be constructed. Options:
              - 'concat'
              - 'temporal_concat'
              - 'max'
              - 'sum'
              - 'prod'
  
          feature_dims (List[int]): the first argument of all fusion layers. It holds a list
              of required feature_dims for each tensor input (where the tensor inputs are of
              shape (batch_size, seq_len, feature_dim)). The list order must corresponds to
              the tensor order passed to forward(...).
      """
      if method == "concat":
          return ConcatFusion(feature_dims)
      elif method == "temporal_concat":
          return TemporalConcatFusion(feature_dims)
      elif method == "max":
          return ReduceFusion(
              feature_dims, lambda x: torch.max(x, dim=0).values
          )
      elif method == "sum":
          return ReduceFusion(
              feature_dims, lambda x: torch.sum(x, dim=0)
          )
      elif method == "prod":
          return ReduceFusion(
              feature_dims, lambda x: torch.prod(x, dim=0)
          )
      else:
          raise NotImplementedError(f"Fusion {method} not available.")
  
imports: from typing import Callable, List
  import torch
  import torch.nn
label_desc: Use image node_id 1 for calling a global function with example usage: make_fusion_layer(method, feature_dims) and returns: ConcatFusion, TemporalConcatFusion, ReduceFusion, ReduceFusion, ReduceFusion