code: def set_subroutine(self, name, code):
          
  
          # Do we have a Python handler?
          if 'python' in self._handlers:
              self._handlers['python']._objects[name] = code
              self._objlangs[name] = 'python'
          else:
              self._warn("Can't set_subroutine: no Python object handler!")
docs: Define a Python object from your program.
  
          This is equivalent to having an object defined in the RiveScript code,
          except your Python code is defining it instead.
  
          :param str name: The name of the object macro.
          :param def code: A Python function with a method signature of
              ``(rs, args)``
  
          This method is only available if there is a Python handler set up
          (which there is by default, unless you've called
          ``set_handler("python", None)``).