def _GetBytes(partition_key):
        """Gets the bytes representing the value of the partition key.
        """
        if isinstance(partition_key, six.string_types):
            return bytearray(partition_key, encoding='utf-8')
        else:
            raise ValueError("Unsupported " + str(type(partition_key)) + " for partitionKey.")