def to_bytes(string):
        """
        Converts the given string into bytes
        """
        # pylint: disable=E0602
        if type(string) is unicode:
            return str(string)
        return string