code: def add_object(self, obj, name):
          
          if name in self._object_map:
              raise RuntimeError('An object is already registered under that name.')
  
          exposed_object = self._object_map[name] = \
              obj if isinstance(obj, ExposedObject) else ExposedObject(obj)
  
          for method_name in exposed_object:
              glue = '.' if not method_name.startswith(':') else ''
              self._add_function(name + glue + method_name, exposed_object[method_name])
docs: Adds the supplied object to the collection under the supplied name. If the name is already
          in use, a RuntimeError is raised. If the object is not an instance of
          :class:`ExposedObject`, the method automatically constructs one.
  
          :param obj: Object to add to the collection.
          :param name: Name of the exposed object.