def hex_str_to_bytes_str(hex_str):
    """Converts the hex string to bytes string.

    :type hex_str: str
    :param hex_str: The hex tring representing trace_id or span_id.

    :rtype: str
    :returns: string representing byte array
    """

    return bytes(bytearray.fromhex(hex_str))