import time


def format_time(to_format):
	"""
	Takes a string in the format 2200 and returns a string in the format
	11:00 PM
	"""
	in_time = time.strptime(str(to_format), '%H%M')
	return time.strftime('%I:%M %p', in_time)