def dict_param_to_nsmlib_bin_str(params):
    """A simple function to convert a dictionary of params to a string that can be
       understood by NMSLIB binary.

    :param params:  a dictionary of parameters, e.g., {'M': 30, 'indexThreadQty': 4}
    :return: a string, e.g., M=30,indexThreadQty=4
    """
    return ','.join([str(k) + '=' + str(v) for k, v in params.items()])