def get_dotnotation(original: dict, dotnotation: str) ->dict:
    """Use dotted notation to create set values in a dict,
    e.g:
    >>> dotattr({}, 'some.path.in.dict', 'value')
    { "some": { "path": { "in": {"dict": "value" }}}}

    >>> dotattr({'credentials': {'username': 'test'}}, 'credentials.username')
    'test'
    """
    original = original or {}
    parts = dotnotation.split('.')
    current = original
    for part in parts:
        if part is parts[-1]:
            return current[part]
        elif part not in current:
            current[part] = {}
        current = current[part]
    return original
