def METHOD_NAME(self):
    """
    Whether the optimizer supports collapsing of the model
    parameters/gradients into a single contiguous Tensor.
    """
    if hasattr(self.optimizer, "supports_flat_params"):
        return self.optimizer.METHOD_NAME
    return False