def extractParams(param_str):
    """
    Extracts parameters into a dict from string.
    Input:
        1. param_str (str) string of parameters in format “k1:10;k2:20” 

    Returns:
        2. mydict (dict) with format {k1: 10, k2:20}
    """
    #default parameters?
    if ',' in param_str:
        raise NameError(' , is an invalid character for parameter string.')
    if ':' not in param_str:
        raise NameError('No parameters found.')
    mydict = {}
    mystr = param_str.split(';')
    for s in mystr:
        k,v = s.split(':')
        mydict[k.strip()] = v.strip()
    return mydict