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')

def descriptor_factory(self, type_name, shard=u'lobby', **kwargs):
        """
        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')
        """
        desc = factories.build(type_name, shard=unicode(shard), **kwargs)
        return self._database_connection.save_document(desc)