code: def write_metadata(self, metadata: dict):
      self.artifact.metadata.metadata = metadata
  
file_path: FATE/python/fate/components/core/component_desc/artifacts/model/_directory.py
imports: import datetime
  import typing
  from pathlib import Path
  from fate.components.core.essential import ModelDirectoryArtifactType
  from .._base_type import URI, ArtifactDescribe, Metadata, ModelOutputMetadata, _ArtifactType, _ArtifactTypeReader, _ArtifactTypeWriter
label_desc: Use image node_id 2 for calling the ModelDirectoryWriter obj's underlying member method code with example usage: obj.write_metadata(metadata) without return types