class_docstr: Tests for ops in horovod.tensorflow.keras.
class_docstr_tok: ["Tests","for","ops","in","horovod.tensorflow.keras","."]
code: def test_from_config(self):
      with self.test_session(config=self.config) as sess:
          K.set_session(sess)
  
          opt = keras.optimizers.Adam()
          hopt = hvd.DistributedOptimizer(opt)
          cfg = hopt.get_config()
  
          hopt_copy1 = hopt.from_config(cfg)
          self.assertEqual(cfg, hopt_copy1.get_config())
  
          hopt_copy2 = hopt.__class__.from_config(cfg)
          self.assertEqual(cfg, hopt_copy2.get_config())
  
imports: import math
  import numpy
  import os
  import pytest
  import sys
  import tensorflow
  import warnings
  from packaging import version
  from tensorflow import keras
  from horovod.common.util import is_version_greater_equal_than
  import horovod.tensorflow.keras
  from common import temppath
label_desc: Use image node_id 11 for calling the TfKerasTests obj's underlying member method code with example usage: obj.test_from_config() without return types