def from_dict(cls, json_object):
    """Constructs a `TransformerConfig` from a Python dict of parameters."""
    config = TransformerConfig(vocab_size=None)
    for key, value in json_object.items():
      config.__dict__[key] = value
    return config
Constructs a `TransformerConfig` from a Python dict of parameters.
language/capwap/utils/transformer_utils.py