<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def initialize(config):
	"Initialize the bot with a dictionary of config items"
	config = init_config(config)

	_setup_logging()
	_load_library_extensions()
	if not Handler._registry:
		raise RuntimeError("No handlers registered")

	class_ = _load_bot_class()

	config.setdefault('log_channels', [])
	config.setdefault('other_channels', [])

	channels = config.log_channels + config.other_channels

	log.info('Running with config')
	log.info(pprint.pformat(config))

	host = config.get('server_host', 'localhost')
	port = config.get('server_port', 6667)

	return class_(
		host,
		port,
		config.bot_nickname,
		channels=channels,
		password=config.get('password'),
	)