def _to_map(value, delimiter1=":", delimiter2="="):
    """
    Converts raw string to map
    Ex. 'ns=bar:roster=null:pending_roster=A,B,C:observed_nodes=null'
    Returns {'ns': 'bar', 'roster': 'null', 'pending_roster': 'A,B,C', 'observed_nodes': 'null'}
    """
    vmap = {}
    if not value:
        return vmap

    try:
        data_list = value.split(delimiter1)
    except Exception:
        return vmap

    for kv in data_list:
        try:
            k, v = kv.split(delimiter2)
            vmap[k] = v
        except Exception:
            continue

    return vmap