class_docstr: This mixin provides an ability to call a custom hook when depth of the
  binary expression reaches certain threshold.
  
  Subclasses must specify value for `bin_depth_threshold`.
  
  By default it creates a variable and assigns it the result of the incoming
  expression interpretation.
  
  Subclasses may override this default behaviour.
code: def bin_depth_threshold_hook(self, expr, **kwargs):
      if expr in self._cached_expr_results:
          return self._cached_expr_results[expr].var_name
      result = self._do_interpret(expr, **kwargs)
      var_name = self._cg.add_var_declaration(expr.output_size)
      self._cg.add_var_assignment(var_name, result, expr.output_size)
      return var_name
  
imports: import math
  import sys
  from collections import namedtuple
  from m2cgen import ast
  from m2cgen.interpreters.interpreter import BaseToCodeInterpreter
label_desc: Use image node_id 2 for calling the BinExpressionDepthTrackingMixin obj's underlying member method code with example usage: obj.bin_depth_threshold_hook(expr) and returns: var_name, self