otherwise cmp_fmts is a list containing cmp_fmt. call the method serializers.get_public_serializer_formats, substitute the result for ser_fmts if ser_fmt is None,
ser_fmts = serializers . get_public_serializer_formats ( ) if ser_fmt is None else [ ser_fmt ]