code: def _gen_identity(self, key, param=None):
          
          if self.identity_generator and param is not None:
              if self.serializer:
                  param = self.serializer.serialize(param)
              if self.compressor:
                  param = self.compressor.compress(param)
              identity = self.identity_generator.generate(key, param)
          else:
              identity = key
          return identity
docs: generate identity according to key and param given