code: def _GetBytes(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.")
docs: Gets the bytes representing the value of the partition key.