def METHOD_NAME(optimizer):
  """Returns a list of variables for the given `tf.compat.v1.train.Optimizer`.
  Equivalent to `optimizer.variables()`.
  Args:
    optimizer: An instance of `tf.compat.v1.train.Optimizer` which has created
      variables (typically after a call to `Optimizer.minimize`).
  Returns:
    A list of variables which have been created by the `Optimizer`.
  """
  return optimizer.variables()