def get_partition_hash(self):
if self.has_partition_hash():<EOL><INDENT>return unpack_from(FMT_BE_INT, self._buffer, PARTITION_HASH_OFFSET)[<NUM_LIT:0>]<EOL><DEDENT>return self.hash_code()<EOL>
Returns partition hash calculated for serialized object.
    Partition hash is used to determine partition of a Data and is calculated using
        * PartitioningStrategy during serialization.
        * If partition hash is not set then hash_code() is used.

:return: partition hash