def METHOD_NAME(self):
    """
    Hack from Guillaume to fix adaptive weights with distributed code.
    """
    if hasattr(self.model, 'module'):
        ffn = self.model.module.decoder.layers[self.opt['hash_layer']].ffn
    else:
        ffn = self.model.decoder.layers[self.opt['hash_layer']].ffn
    METHOD_NAME = 0 * (
        sum(x.weight[0, 0] for x in ffn.linears1)
        + sum(x.weight[0, 0] for x in ffn.linears2)
        + sum(x.bias[0] for x in ffn.linears1)
        + sum(x.bias[0] for x in ffn.linears2)
    )
    return METHOD_NAME