code: def _model_fn(self, features, mode, params):
      model = self.model_function
      if mode == tf.estimator.ModeKeys.TRAIN:
          spec = self.train_model_init(model, features, mode, params)
      elif mode == tf.estimator.ModeKeys.EVAL:
          spec = self.evaluate_model_init(model, features, mode, params)
      else:
          spec = self.infer_model_init(model, features, mode, params)
      return spec
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import json
  import numpy
  import tensorflow
  import tf_euler
label_desc: Use image node_id 2 for calling the BaseEstimator obj's underlying member method code with example usage: obj._model_fn(features, mode, params) and returns: spec