code: def set(self, path: List[str], attr: T) -> None:
      ref = self._structure
      location, attribute_name = path[:-1], path[-1]
  
      for idx, part in enumerate(location):
          if part not in ref:
              ref[part] = self._node_factory(location[: idx + 1])
          ref = ref[part]
          if not isinstance(ref, self._node_type):
              raise MetadataInconsistency(
                  "Cannot access path '{}': '{}' is already defined as an attribute, "
                  "not a namespace".format(path_to_str(path), part)
              )
  
      if attribute_name in ref and isinstance(
          ref[attribute_name], self._node_type
      ):
          if isinstance(attr, self._node_type):
              # in-between nodes are auto-created, so ignore it's OK unless we want to change the type
              return
          raise MetadataInconsistency(
              "Cannot set attribute '{}'. It's a namespace".format(
                  path_to_str(path)
              )
          )
  
      ref[attribute_name] = attr
  
file_path: neptune-client/src/neptune/internal/container_structure.py
imports: from collections import deque
  from typing import Callable, Generic, List, Optional, TypeVar, Union
  from neptune.exceptions import MetadataInconsistency
  from neptune.internal.utils.paths import path_to_str
label_desc: Use image node_id 6 for calling the ContainerStructure obj's underlying member method code with example usage: obj.set(path, attr) without return types