code: def serialize_basic(self, data, data_type, **kwargs):
          
          custom_serializer = self._get_custom_serializers(data_type, **kwargs)
          if custom_serializer:
              return custom_serializer(data)
          if data_type == 'str':
              return self.serialize_unicode(data)
          return eval(data_type)(data)
docs: Serialize basic builting data type.
          Serializes objects to str, int, float or bool.
  
          Possible kwargs:
          - is_xml bool : If set, adapt basic serializers without the need for basic_types_serializers
          - basic_types_serializers dict[str, callable] : If set, use the callable as serializer
  
          :param data: Object to be serialized.
          :param str data_type: Type of object in the iterable.