code: def return_if_raise(exception_tuple, retval_if_exc, disabled=False):
      
      # we need a tuple of exceptions.
      if isinstance(exception_tuple, list):
          exception_tuple = tuple(exception_tuple)
      elif not isinstance(exception_tuple, tuple):
          exception_tuple = (exception_tuple,)
      else:
          raise TypeError("Wrong exception_tuple %s" % type(exception_tuple))
  
      def decorator(func):
          @wraps(func)
          def wrapper(*args, **kwargs):
              if disabled:
                  return func(*args, **kwargs)
              try:
                  return func(*args, **kwargs)
              except exception_tuple:
                  return retval_if_exc
              else:
                  raise RuntimeError()
          return wrapper
      return decorator
docs: Decorator for functions, methods or properties. Execute the callable in a
      try block, and return retval_if_exc if one of the exceptions listed in
      exception_tuple is raised (se also ``return_node_if_raise``).
  
      Setting disabled to True disables the try except block (useful for
      debugging purposes). One can use this decorator to define properties.
  
      Example::
  
          @return_if_raise(ValueError, None)
          def return_none_if_value_error(self):
              pass
  
          @return_if_raise((ValueError, KeyError), "hello")
          def another_method(self):
              pass
  
          @property
          @return_if_raise(AttributeError, None)
          def name(self):
              "Name of the object, None if not set."
              return self._name