class_docstr: Apply transform-average-concatenate across channels.
  We're using a version from [2].
  
  Args:
      in_features: Number of input features
      out_features: Number of output features
  
  References:
      [1] Luo et al, End-to-end Microphone Permutation and Number Invariant Multi-channel Speech Separation, 2019
      [2] Yoshioka et al, VarArray: Array-Geometry-Agnostic Continuous Speech Separation, 2022
docstr: Args:
      input: shape (B, M, in_features, T)
  
  Returns:
      Output tensor with shape shape (B, M, out_features, T)
docstr_tok: ["Args",":","input",":","shape","(","B",",","M",",","in_features",",","T",")","Returns",":","Output","tensor","with","shape","shape","(","B",",","M",",","out_features",",","T",")"]
code: def forward(self, input: torch.Tensor) -> torch.Tensor:
      """
      Args:
          input: shape (B, M, in_features, T)
  
      Returns:
          Output tensor with shape shape (B, M, out_features, T)
      """
      B, M, F, T = input.shape
  
      # (B, M, F, T) -> (B, T, M, F)
      input = input.permute(0, 3, 1, 2)
  
      # transform and average across channels
      average = self.transform_average(input)
      average = torch.mean(average, dim=-2, keepdim=True)
      # view with the number of channels expanded to M
      average = average.expand(-1, -1, M, -1)
  
      # transform each channel
      transform = self.transform_channel(input)
  
      # concatenate along feature dimension
      output = torch.cat([transform, average], dim=-1)
  
      # Return to the original layout
      # (B, T, M, F) -> (B, M, F, T)
      output = output.permute(0, 2, 3, 1)
  
      return output
  
imports: import random
  from typing import Callable, Optional
  import torch
  from nemo.collections.asr.parts.submodules.multi_head_attention import MultiHeadAttention
  from nemo.core.classes import NeuralModule, typecheck
  from nemo.core.neural_types import AudioSignal, FloatType, NeuralType, SpectrogramType
  from nemo.utils import logging
label_desc: Use image node_id 4 for calling the TransformAverageConcatenate obj's underlying member method code with example usage: obj.forward(input) and returns: output