def toBytes(text, encoding=DEFAULT_ENCODING):
    """
    Converts the inputted text to base string bytes array.
    
    :param      text | <variant>
    
    :return     <str> || <bytes> (python3)
    """
    if not text:
        return text

    if not isinstance(text, bytes_type):
        text = text.encode(encoding)

    return text
Converts the inputted text to base string bytes array.
    
    :param      text | <variant>
    
    :return     <str> || <bytes> (python3)