def setup_components_and_tf_funcs(self, custom_getter=None):
if custom_getter is None:<EOL><INDENT>def custom_getter(getter, name, registered=False, **kwargs):<EOL><INDENT>"""<STR_LIT>"""<EOL>if registered:<EOL><INDENT>self.registered_variables.add(name)<EOL><DEDENT>elif name in self.registered_variables:<EOL><INDENT>registered = True<EOL><DEDENT>variable = getter(name=name, **kwargs)<EOL>if registered:<EOL><INDENT>pass<EOL><DEDENT>elif name in self.all_variables:<EOL><INDENT>assert variable is self.all_variables[name]<EOL>if kwargs.get('<STR_LIT>', True):<EOL><INDENT>assert variable is self.variables[name]<EOL>if '<STR_LIT>' in self.summary_labels:<EOL><INDENT>tf.contrib.summary.histogram(name=name, tensor=variable)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>self.all_variables[name] = variable<EOL>if kwargs.get('<STR_LIT>', True):<EOL><INDENT>self.variables[name] = variable<EOL>if '<STR_LIT>' in self.summary_labels:<EOL><INDENT>tf.contrib.summary.histogram(name=name, tensor=variable)<EOL><DEDENT><DEDENT><DEDENT>return variable<EOL><DEDENT><DEDENT>self.fn_initialize = tf.make_template(<EOL>name_='<STR_LIT>',<EOL>func_=self.tf_initialize,<EOL>custom_getter_=custom_getter<EOL>)<EOL>self.fn_preprocess = tf.make_template(<EOL>name_='<STR_LIT>',<EOL>func_=self.tf_preprocess,<EOL>custom_getter_=custom_getter<EOL>)<EOL>self.fn_actions_and_internals = tf.make_template(<EOL>name_='<STR_LIT>',<EOL>func_=self.tf_actions_and_internals,<EOL>custom_getter_=custom_getter<EOL>)<EOL>self.fn_observe_timestep = tf.make_template(<EOL>name_='<STR_LIT>',<EOL>func_=self.tf_observe_timestep,<EOL>custom_getter_=custom_getter<EOL>)<EOL>self.fn_action_exploration = tf.make_template(<EOL>name_='<STR_LIT>',<EOL>func_=self.tf_action_exploration,<EOL>custom_getter_=custom_getter<EOL>)<EOL>return custom_getter<EOL>
Allows child models to create model's component objects, such as optimizer(s), memory(s), etc..
Creates all tensorflow functions via tf.make_template calls on all the class' "tf_"-methods.

Args:
    custom_getter: The `custom_getter_` object to use for `tf.make_template` when creating TensorFlow functions.
        If None, use a default custom_getter_.

Returns: The custom_getter passed in (or a default one if custom_getter was None).