code: def from_dto(cls, artifact_file_dto):
      return cls(
          file_path=artifact_file_dto.filePath,
          file_hash=artifact_file_dto.fileHash,
          type=artifact_file_dto.type,
          size=artifact_file_dto.size,
          metadata=ArtifactMetadataSerializer.deserialize(
              [
                  {"key": str(m.key), "value": str(m.value)}
                  for m in artifact_file_dto.metadata
              ]
          ),
      )
  
imports: import abc
  import enum
  import pathlib
  import typing
  from dataclasses import dataclass
  from neptune.exceptions import NeptuneUnhandledArtifactSchemeException, NeptuneUnhandledArtifactTypeException
label_desc: Use image node_id 1 for calling the ArtifactFileData obj's underlying member method code with example usage: obj.from_dto(cls, artifact_file_dto) and returns: cls