code: def measure_put_attachment(self, key, value):
          
          if self._attachments is None:
              self._attachments = dict()
  
          if key is None or not isinstance(key, str):
              raise TypeError('attachment key should not be '
                              'empty and should be a string')
          if value is None or not isinstance(value, str):
              raise TypeError('attachment value should not be '
                              'empty and should be a string')
  
          self._attachments[key] = value
docs: Associate the contextual information of an Exemplar to this MeasureMap
              Contextual information is represented as key - value string pairs.
              If this method is called multiple times with the same key,
              only the last value will be kept.