def getDictFrom(s):
    """Returns a dict from string representation p_s of the form
       "key1:value1,key2:value2"."""
    res = {}
    if s:
        for part in s.split(','):
            key, value = part.split(':')
            res[key] = value
    return res
