code: def forward(
      ctx,
      A,
      B,
      out=None,
      fw_code=None,
      bw_code=None,
      bsz=1024,
      bsz2=1024,
  ):
      # default of pytorch behavior if inputs are empty
      ctx.is_empty = False
      if prod(A.shape) == 0:
          ctx.is_empty = True
          ctx.A = A
          ctx.B = B
  
          B_shape = B.shape
          if A.shape[-1] == B_shape[0]:
              return torch.empty(
                  A.shape[:-1] + B_shape[1:],
                  dtype=A.dtype,
                  device=A.device,
              )
          else:
              return torch.empty(
                  A.shape[:-1] + B_shape[:1],
                  dtype=A.dtype,
                  device=A.device,
              )
  
      # 1. Dequantize
      # 2. MatmulnN
      cA, state = F.quantize_blockwise(A, code=fw_code, blocksize=bsz)
      fp8A = F.dequantize_blockwise(cA, state, blocksize=bsz).to(
          A.dtype
      )
  
      cB, state = F.quantize(B.float(), code=fw_code)
      fp8B = F.dequantize(cB, state).to(B.dtype)
  
      output = torch.matmul(fp8A, fp8B)
  
      # output is half
  
      # 3. Save state
      ctx.fw_code = fw_code
      ctx.bw_code = bw_code
      ctx.bsz = bsz
      ctx.bsz2 = bsz2
      ctx.dtype_A, ctx.dtype_B = A.dtype, B.dtype
  
      if any(ctx.needs_input_grad[:2]):
          # NOTE: we send back A, and re-quant.
          ctx.tensors = (A, fp8B)
      else:
          ctx.tensors = (None, None)
  
      return output
  
imports: import operator
  import warnings
  from dataclasses import dataclass
  from functools import reduce
  import torch
  import bitsandbytes.functional
  from bitsandbytes.autograd._functions import MatmulLtState, GlobalOutlierPooler
label_desc: Use image node_id 1 for calling the MatMulFP8Mixed obj's underlying member method code with example usage: obj.forward(ctx, A, B, out, fw_code, bw_code, bsz, bsz2) and returns: output, torch, torch