def dict_from_str(s):
    """Convert 'key:value, ...' string to dict."""
    d = {}
    for item in s.split(','):
        key, value = item.split(':')
        d[key.strip()] = value.strip()
    return d