def METHOD_NAME(self, inputs):
    input_flat = inputs.reshape(self.q_groups, -1)
    n = input_flat.shape[1]
    m = input_flat.norm(p=1, dim=1, keepdim=True).div(n)
    output = input_flat.sign().mul(m)
    output = output.reshape(inputs.shape).contiguous()
    return output