from typing import Any


def convert_to_bytes(input: Any) -> bytes:
    """Convert given input into bytes."""
    if isinstance(input, bytes):
        bresult = input
    elif isinstance(input, str):
        bresult = input.encode("utf-8")
    elif input is None:
        bresult = b""
    else:
        assert False, f"Result should be None, string, bytes or Response. Got: {input}"

    return bresult