def multiset(target, key, value):
    """
    Set keys multiple layers deep in a target dict.

    Parameters
    -------------
    target : dict
      Location to set new keys into
    key : str
      Key to set, in the form 'a/b/c'
      will be available as target[a][b][c] = value
    value : any
      Will be added to target dictionary

    Returns
    ------------
    target : dict
      The original dict object
    """
    keys = key.split('/')
    current = target
    for i, key in enumerate(keys):
        last = i >= len(keys) - 1
        if key not in current:
            if last:
                current[key] = value
            else:
                current[key] = {}
        current = current[key]
    return target