code: def set(self, attachments: Dict[str, str], v: str):
      if (
          attachments
          and "" != v
          and v != attachments.get(self.key(), "")
      ):
          attachments[self.key()] = v
  
imports: import json
  import time
  from enum import Enum
  from logging import getLogger
  from typing import Dict, List, Any
  import grpc
  import numpy
  from fate.arch.federation.backends.osx import osx_pb2
  from fate.arch.federation.backends.osx.osx_pb2_grpc import PrivateTransferTransportStub
label_desc: Use image node_id 2 for calling the Metadata obj's underlying member method code with example usage: obj.set(attachments, v) without return types