sample_data = {
  'person:name': 'Guido',
  'person:fullname': 'Guido van Rossum',
  'person:department:title': 'Python developers',
  'person:department:post:title': 'chief',
  'person:department:post:since': '2013-01-01',
  'person:department:post:till': 'now',
  'address:country': 'Nederland, USA',
  'family status': 'married'
}


expected_results = {
  'address': {
    'country': 'Nederland, USA'
  },
  'family status': 'married',
  'person': {
    'name': 'Guido',
    'fullname': 'Guido van Rossum',
    'department': {
      'title': 'Python developers',
      'post': {
        'since': '2013-01-01',
        'till': 'now',
        'title': 'chief'
      }
    }
  }
}

def unflatten(dictionary):
    resultDict = dict()
    for key, value in dictionary.items():
        parts = key.split(":")
        d = resultDict
        for part in parts[:-1]:
            if part not in d:
                d[part] = dict()
            d = d[part]
        d[parts[-1]] = value
    return resultDict


r = unflatten(sample_data)

print(r)
print(r==expected_results)