code: def descriptor_factory(self, type_name, shard=u'lobby', **kwargs):
          
          desc = factories.build(type_name, shard=unicode(shard), **kwargs)
          return self._database_connection.save_document(desc)
docs: Creates and returns a descriptor to pass it later
          for starting the agent.
          First parameter is a type_name representing the descirptor.
          Second parameter is optional (default lobby). Usage:
          > descriptor_factory('shard_descriptor', 'some shard')