def read_file(file):
	"""Read ``file`` into ``bytes``.
	
	:arg file type: path-like or file-like
	:rtype: bytes
	"""
	if hasattr(file, "read"):
		return file.read()
	if hasattr(file, "read_bytes"):
		return file.read_bytes()
	with open(file, "rb") as f:
		return f.read()