def dump_dataclass_object(packet_obj: object) -> bytes:
    """Given a dataclass object, will return it as bytes

    Args:
        packet_obj: A dataclass object

    Returns: bytes representing given dataclass object
    """
    raw_packet = bytearray()
    for _, value in packet_obj.__dict__.items():
        raw_packet += value

    return raw_packet