code: def tag(self, **tags):
          
          for key in tags.keys():
              self.tags[TAG_RE.sub("_", compat.text_type(key))] = encoding.keyword_field(compat.text_type(tags[key]))
docs: Tag this transaction with one or multiple key/value tags. Both the values should be strings
  
              transaction_obj.tag(key1="value1", key2="value2")
  
          Note that keys will be dedotted, replacing dot (.), star (*) and double quote (") with an underscore (_)