code: def _match_serializers_by_query_arg(self, serializers):
          
          # if the format query argument is present, match the serializer
          arg_name = current_app.config.get('REST_MIMETYPE_QUERY_ARG_NAME')
          if arg_name:
              arg_value = request.args.get(arg_name, None)
  
              if arg_value is None:
                  return None
              # Search for the serializer matching the format
              try:
                  return serializers[
                      self.serializers_query_aliases[arg_value]]
              except KeyError:  # either no serializer for this format
                  return None
  
          return None
docs: Match serializer by query arg.