def to_bytes(value):
    if (not isinstance(value, str)):
        raise TypeError('Value must be an instance of str')
    if (len(value) % 2):
        value = ('0x0' + self.remove_0x_prefix(value))
    return base64.b16decode(self.remove_0x_prefix(value), casefold=True)
def to_bytes(value):
    if (not isinstance(value, str)):
        raise TypeError('Value must be an instance of str')
    if (len(value) % 2):
        value = ('0x0' + self.remove_0x_prefix(value))
    return base64.b16decode(self.remove_0x_prefix(value), casefold=True)