new_contents: #
  # Copyright 2013 Baxter, Lovell, Mangsingkha, Saeedi
  #
  #   Licensed under the Apache License, Version 2.0 (the "License");
  #   you may not use this file except in compliance with the License.
  #   You may obtain a copy of the License at
  #
  #       http://www.apache.org/licenses/LICENSE-2.0
  #
  #   Unless required by applicable law or agreed to in writing, software
  #   distributed under the License is distributed on an "AS IS" BASIS,
  #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  #   See the License for the specific language governing permissions and
  #   limitations under the License.
  #
  import inspect
  #
  import tabular_predDB.python_utils.general_utils as gu
  
  
  class EngineTemplate(object):
  
      def __init__(self, seed=0):
          self.seed_generator = gu.int_generator(seed)
  
      def get_next_seed(self):
          return self.seed_generator.next()
  
      def initialize(self, M_c, M_r, T, initialization='from_the_prior'):
          pass
  
      def analyze(self, M_c, T, X_L, X_D, kernel_list=(), n_steps=1, c=(), r=(),
                  max_iterations=-1, max_time=-1):
          pass
  
      def simple_predictive_sample(self, M_c, X_L, X_D, Y, Q, n=1):
          pass
  
      def simple_predictive_probability(self, M_c, X_L, X_D, Y, Q, n):
          pass
  
      def impute(self, M_c, X_L, X_D, Y, Q, n):
          pass
  
      def impute_and_confidence(self, M_c, X_L, X_D, Y, Q, n):
          pass
  
      def conditional_entropy(M_c, X_L, X_D, d_given, d_target,
                              n=None, max_time=None):
          pass
  
      def predictively_related(self, M_c, X_L, X_D, d,
                                             n=None, max_time=None):
          pass
  
      def contextual_structural_similarity(self, X_D, r, d):
          pass
  
      def structural_similarity(self, X_D, r):
          pass
  
      def structural_anomalousness_columns(self, X_D):
          pass
  
      def structural_anomalousness_rows(self, X_D):
          pass
  
      def predictive_anomalousness(self, M_c, X_L, X_D, T, q, n):
          pass
  
  
  # helper functions
  def is_obj_method_name(obj, method_name):
      attr = getattr(obj, method_name)
      is_method = inspect.ismethod(attr)
      return is_method
  #
  def get_method_names(obj=EngineTemplate):
      is_this_obj_method_name = lambda method_name: \
          is_obj_method_name(obj, method_name)
      #
      this_obj_attrs = dir(obj)
      this_obj_method_names = filter(is_this_obj_method_name, this_obj_attrs)
      return this_obj_method_names
  #
  def get_method_name_to_args():
      method_names = get_method_names()
      method_name_to_args = dict()
      for method_name in method_names:
          method = Engine.__dict__[method_name]
          arg_str_list = inspect.getargspec(method).args[1:]
          method_name_to_args[method_name] = arg_str_list
      return method_name_to_args
  
subject: add EngineTemplate to back remote engine