code: def register_instance(self, obj, prefix=''):
          
          dispatch = self.__class__()
          for name, f in inspect.getmembers(
                  obj, lambda f: callable(f) and hasattr(f, '_rpc_public_name')):
              dispatch.add_method(f, f._rpc_public_name)
  
          # add to dispatchers
          self.add_subdispatch(dispatch, prefix)
docs: Create new subdispatcher and register all public object methods on
          it.
  
          To be used in conjunction with the :py:func:`public`
          decorator (*not* :py:func:`RPCDispatcher.public`).
  
          :param obj: The object whose public methods should be made available.
          :type obj: object
          :param str prefix: A prefix for the new subdispatcher.