code: def __init__(
      self, data_path: Path, metadata: Optional[Dict[str, Any]] = None
  ):
      # initialize directory
      os.makedirs(data_path, exist_ok=True)
  
      self._metadata_path: Path = (
          data_path / MetadataFile.METADATA_FILE
      ).resolve(strict=False)
      self._data: Dict[str, Any] = self._read_or_default()
  
      if metadata:
          for key, value in metadata.items():
              self.__setitem__(key, value)
          self.flush()
  
file_path: neptune-client/src/neptune/internal/metadata_file.py
imports: import json
  import os
  from pathlib import Path
  from types import TracebackType
  from typing import Any, Dict, Optional, Type
label_desc: Use image node_id 1 to create a new MetadataFile object  with example: obj = MetadataFile(data_path, metadata)