class_docstr: Decorator to keep backward compatibility support for old methods without exposing them (non-discoverable, non-documented).
  
  :example:
      @backwards_compatibility(
          class_attrs=dict(
            counter=1
          ),
          instance_attrs=dict(
            getincr=local_function_with_legacy_logic
          )
      )
      class Foo(metaclass=H2OMeta):
          global_counter = 0
  
          def __init__(self):
              self._counter = 0
  
          def incr_and_get(self):
              Foo.counter += 1
              self._counter += 1
              return self._counter
class_docstr_tok: ["Decorator","to","keep","backward","compatibility","support","for","old","methods","without","exposing","them","(","non-discoverable",",","non-documented",")",".",":","example",":","@","backwards_compatibility","(","class_attrs=dict","(","counter=1",")",",","instance_attrs=dict","(","getincr=local_function_with_legacy_logic",")",")","class","Foo","(","metaclass=H2OMeta",")",":","global_counter","=","0","def","__init__","(","self",")",":","self._counter","=","0","def","incr_and_get","(","self",")",":","Foo.counter","+=","1","self._counter","+=","1","return","self._counter"]
code: def __call__(self, clz):
      clz._bc = self
      new_clz = None
  
      @wraps(clz.__init__)
      def __init__(self, *args, **kwargs):
          super(new_clz, self).__init__(*args, **kwargs)
          self._bci = {
              name: val.__get__(self, new_clz) if callable(val) else val
              for name, val in clz._bc._instance_attrs.items()
          }
  
      def __getattr__(self, name):
          try:
              attr = super(new_clz, self).__getattr__(self, name)
              return attr
          except AttributeError:
              pass
          if name != "_bci" and name in self._bci:
              return self._bci[name]
          return getattr(new_clz, name)
  
      new_clz = extend_and_replace(
          clz, __init__=__init__, __getattr__=__getattr__
      )
      return new_clz
  
imports: from h2o.utils.compatibility import *
  from functools import wraps
  import inspect
  import warnings
  from h2o.exceptions import H2ODeprecationWarning
label_desc: Use image node_id 2 for calling the _BackwardsCompatible obj's underlying member method code with example usage: obj.__call__(clz) and returns: new_clz, getattr, attr, self