class_docstr: Adapts a Sonnet module to conform to the Keras Layer API.
  
      >>> layer = LayerAdapter(snt.Linear(1))
      >>> assert isinstance(layer, tf.keras.layers.Layer)
  
  We support building without ``__call__``, even with unknown dimensions:
  
      >>> layer.build(input_shape=[None, 28 * 28])
  
  Of course now features of Keras work as expected, for example layer freezing:
  
      >>> [v.name for v in layer.trainable_variables]
      ["linear/b:0", "linear/w:0"]
  
      >>> layer.trainable = False
      >>> layer.trainable_variables
      []
code: def __init__(self, module, method="__call__", dtype=tf.float32):
      super().__init__(dtype=dtype)
      self.module = module
      self._module_call_method = getattr(module, method)
      self._output_shapes = None
  
imports: from absl.testing import parameterized
  import sonnet
  from sonnet.src import test_utils
  from sonnet.src.conformance import descriptors
  import tensorflow
  import tree
label_desc: Use image node_id 1 to create a new LayerAdapter object from inherited base classes: tf.keras.layers with example: obj = LayerAdapter(module, method, dtype)