code: def serializer_for(self, obj):
          
          # 1-NULL serializer
          if obj is None:
              return self._null_serializer
  
          obj_type = type(obj)
  
          # 2-Default serializers, Dataserializable, Portable, primitives, arrays, String and some helper types(BigInteger etc)
          serializer = self.lookup_default_serializer(obj_type, obj)
  
          # 3-Custom registered types by user
          if serializer is None:
              serializer = self.lookup_custom_serializer(obj_type)
  
          # 5-Global serializer if registered by user
          if serializer is None:
              serializer = self.lookup_global_serializer(obj_type)
  
          # 4 Internal serializer
          if serializer is None:
              serializer = self.lookup_python_serializer(obj_type)
  
          if serializer is None:
              raise HazelcastSerializationError("There is no suitable serializer for:" + str(obj_type))
          return serializer
docs: Searches for a serializer for the provided object
              Serializers will be  searched in this order;
  
              1-NULL serializer
              2-Default serializers, like primitives, arrays, string and some default types
              3-Custom registered types by user
              4-Global serializer if registered by user
              4-pickle serialization as a fallback
  
          :param obj: input object
          :return: Serializer