code: def set_field_value(document_data, field_path, value):
      
      current = document_data
      for element in field_path.parts[:-1]:
          current = current.setdefault(element, {})
      if value is _EmptyDict:
          value = {}
      current[field_path.parts[-1]] = value
docs: Set a value into a document for a field_path