def insert(self, key, value):
        """Inserts a key and value in the map if the map does not already
        contain the key.

        :type key: :class: '~opencensus.tags.tag_key.TagKey'
        :param key: a tag key to insert into the map

        :type value: :class: '~opencensus.tags.tag_value.TagValue'
        :param value: a tag value that is associated with the tag key and
        the value to insert into the tag map

        """
        if key in self.map:
            return

        try:
            tag_key = TagKey(key)
            tag_val = TagValue(value)
            self.map[tag_key] = tag_val
        except ValueError:
            raise
def insert ( self , key , value ) : if key in self . map : return try : tag_key = TagKey ( key ) tag_val = TagValue ( value ) self . map [ tag_key ] = tag_val except ValueError : raise
Inserts a key and value in the map if the map does not already
        contain the key.

        :type key: :class: '~opencensus.tags.tag_key.TagKey'
        :param key: a tag key to insert into the map

        :type value: :class: '~opencensus.tags.tag_value.TagValue'
        :param value: a tag value that is associated with the tag key and
        the value to insert into the tag map