class_docstr: Helper class for to_sonnet_module.
  
  This wraps arbitrary Tensor-valued callables as a Sonnet module.
  A use case for this is in agent code that could take either a trainable
  sonnet module or a hard-coded function as its policy. By wrapping a hard-coded
  policy with this class, the agent can then treat it as if it were a Sonnet
  module. This removes the need for "if is_hard_coded:..." branches, which you'd
  otherwise need if e.g. calling get_variables() on the policy.
code: def __init__(
      self,
      transformation: types.TensorValuedCallable,
      name: Optional[str] = None,
  ):
      super().__init__(name=name)
      self._transformation = transformation
  
imports: import functools
  from typing import List, Optional, Union
  from acme import types
  from acme.utils import tree_utils
  import sonnet
  import tensorflow
  import tree
label_desc: Use image node_id 1 to create a new TransformationWrapper object from inherited base classes: snt with example: obj = TransformationWrapper(transformation, name)