def response_map(fetch_map):
	"""Create an expected FETCH response map from the given request map.

	Most of the keys returned in a FETCH response are unmodified from the
	request. The exceptions are BODY.PEEK and BODY partial range. A BODY.PEEK
	request is answered without the .PEEK suffix. A partial range (e.g.
	BODY[]<0.1000>) has the octet count (1000) removed, since that information
	is provided in the literal size (and may be different if the data was
	truncated).
	"""
	if not isinstance(fetch_map, dict):
		fetch_map = dict((v, v) for v in fetch_map)
	rmap = {}
	for k, v in fetch_map.items():
		for name in ('BODY', 'BINARY'):
			if k.startswith(name):
				k = k.replace(name + '.PEEK', name, 1)
				if k.endswith('>'):
					k = k.rsplit('.', 1)[0] + '>'
		rmap[k] = v
	return rmap