@staticmethod
def run_func_without_hooks(sess, func):
    """ Executes a function that depends on a raw TensorFlow session without hooks
            :param sess: The wrapped TensorFlow session.
            :param func: A function to execute (args: session [the raw TF session])
        """
    if hasattr(sess, 'run_step_fn'):
        return sess.run_step_fn(lambda step_context: func(step_context.session)
            )
    return func(sess)
