@classmethod
def serialize_string(cls, read):
    """
        Emulates gst_value_serialize_string.
        Accepts a bytes, str or None type.
        Returns a str type.
        """
    if read is None:
        return 'NULL'
    if read == 'NULL':
        return '"NULL"'
    if type(read) is bytes:
        pass
    elif type(read) is str:
        read = read.encode()
    else:
        raise TypeError('Expect a None, str, or a bytes type')
    if not read:
        return '""'
    added_wrap = False
    ser_string_list = []
    for byte in bytearray(read):
        if byte in cls.GST_ASCII_CHARS:
            ser_string_list.append(chr(byte))
        elif byte < 32 or byte >= 127:
            ser_string_list.append('\\{:03o}'.format(byte))
            added_wrap = True
        else:
            ser_string_list.append('\\' + chr(byte))
            added_wrap = True
    if added_wrap:
        ser_string_list.insert(0, '"')
        ser_string_list.append('"')
    return ''.join(ser_string_list)
