class_docstr: Wraps a model_fn as a Sonnet module with a name.
  
  Following `blocks.py` convention, a `model_fn` is a callable that, when called
  with no arguments, returns a callable similar to a Sonnet module instance.
class_docstr_tok: ["Wraps","a","model_fn","as","a","Sonnet","module","with","a","name",".","Following","`","blocks.py","`","convention",",","a","`","model_fn","`","is","a","callable","that",",","when","called","with","no","arguments",",","returns","a","callable","similar","to","a","Sonnet","module","instance","."]
docstr: Inits the module.
  
  Args:
    model_fn: callable that, when called with no arguments, returns a callable
        similar to a Sonnet module instance.
    name: Name for the wrapper module.
docstr_tok: ["Inits","the","module",".","Args",":","model_fn",":","callable","that",",","when","called","with","no","arguments",",","returns","a","callable","similar","to","a","Sonnet","module","instance",".","name",":","Name","for","the","wrapper","module","."]
code: def __init__(self, model_fn, name):
      """Inits the module.
  
      Args:
        model_fn: callable that, when called with no arguments, returns a callable
            similar to a Sonnet module instance.
        name: Name for the wrapper module.
  
      """
      super(WrappedModelFnModule, self).__init__(name=name)
      with self._enter_variable_scope():
          self._model = model_fn()
  
file_path: graph_nets/graph_nets/_base.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import contextlib
  import six
  import sonnet
label_desc: Use image node_id 1 to create a new WrappedModelFnModule object from inherited base classes: AbstractModule with example: obj = WrappedModelFnModule(model_fn, name)