def validate_request_partition_key(self, request):
if self.batch_partition_key:<EOL><INDENT>if self.get_request_partition_key(request) !=self.batch_partition_key:<EOL><INDENT>raise AzureBatchValidationError(_ERROR_INCORRECT_PARTITION_KEY_IN_BATCH)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.batch_partition_key = self.get_request_partition_key(request)<EOL><DEDENT>
Validates that all requests have the same PartitiionKey. Set the
PartitionKey if it is the first request for the batch operation.

request:
    the request to insert, update or delete entity