code: def g(ws):
      """Transform 2.
  
      This method takes a full complex matrix and converts it to a block
      matrix. The result will have the following format:
      (*,2C,2C).
  
      Arguments
      ---------
      ws : tensor
          An input matrix. The tensor must have the following format:
          (*,C,C,2)
      """
  
      # Dimensions
      D = ws.dim()
      C = ws.shape[D - 2]
  
      # Output matrix
      wsh = torch.zeros(
          ws.shape[0 : (D - 3)] + (2 * C, 2 * C),
          dtype=ws.dtype,
          device=ws.device,
      )
      wsh[..., slice(0, 2 * C, 2), slice(0, 2 * C, 2)] = ws[..., 0]
      wsh[..., slice(1, 2 * C, 2), slice(1, 2 * C, 2)] = ws[..., 0]
      wsh[..., slice(0, 2 * C, 2), slice(1, 2 * C, 2)] = -1 * ws[..., 1]
      wsh[..., slice(1, 2 * C, 2), slice(0, 2 * C, 2)] = ws[..., 1]
  
      return wsh
  
file_path: speechbrain/speechbrain/processing/decomposition.py
imports: import torch
label_desc: Use image node_id 5 for calling a global function with example usage: g(ws) and returns: wsh