def METHOD_NAME(self, xq, xk, xv, z, zmask, yq, yk, yv, ymask, ymask2):
    x0, x0w = self.attention_0_0(xq, xk, xv)
    x1, x1w = self.attention_0_1(xq, xk, xv)
    x2, x2w = self.attention_0_2(xq, xk, xk)
    x3, _ = self.attention_0_3(z, z, z, need_weights=False)
    x33, _ = self.attention_0_3(z, z, z, attn_mask=zmask)
    x4, x4w = self.attention_0_4(yq, yk, yv)
    x5, x5w = self.attention_0_5(yq, yk, yv, attn_mask=ymask)
    x6, x6w = self.attention_0_6(yq, yk, yv, attn_mask=ymask2)
    if version.parse(torch.__version__) < version.parse('1.9'):
        return x0, x0w, x1, x1w, x2, x2w, x3, x33, x4, x4w, x5, x5w, x6, x6w
    xq = xq.transpose(0, 1)
    xk = xk.transpose(0, 1)
    xv = xv.transpose(0, 1)
    z = z.transpose(0, 1)
    yq = yq.transpose(0, 1)
    yk = yk.transpose(0, 1)
    yv = yv.transpose(0, 1)
    y0, y0w = self.attention_1_0(xq, xk, xv)
    y1, y1w = self.attention_1_1(xq, xk, xv)
    y2, y2w = self.attention_1_2(xq, xk, xk)
    y3, _ = self.attention_1_3(z, z, z)
    if version.parse(torch.__version__) >= version.parse('1.12') and version.parse(torch.__version__) < version.parse('1.13'):
        # HACK pytorch 1.12 breaks 2-dim zmask
        # https://github.com/pytorch/pytorch/issues/97409
        # zmask2 = zmask.reshape(1, 1, 30, 30).expand(1, 8, 30, 30)
        # y33, _ = self.attention_1_3(z, z, z, attn_mask=zmask2)
        # but it produce all nan then, skip test :(
        y33 = y3
    elif version.parse(torch.__version__) >= version.parse('2.0') and version.parse(torch.__version__) < version.parse('2.1'):
        # HACK pytorch 2.0 produce all nan, skip test :(
        y33 = y3
    else:
        y33, _ = self.attention_1_3(z, z, z, attn_mask=zmask)
    y4, y4w = self.attention_1_4(yq, yk, yv)
    y5, y5w = self.attention_1_5(yq, yk, yv, attn_mask=ymask)
    y6, y6w = self.attention_1_6(yq, yk, yv, attn_mask=ymask2)
    return x0, x0w, x1, x1w, x2, x2w, x3, x33, x4, x4w, x5, x5w, x6, x6w, y0, y0w, y1, y1w, y2, y2w, y3, y33, y4, y4w, y5, y5w, y6, y6w