code: def _set_attr(self, **kwargs):
          
          for key, value in kwargs.items():
              if not isinstance(value, string_types):
                  raise ValueError("Set Attr only accepts string values")
              check_call(_LIB.MXSymbolSetAttr(
                  self.handle, c_str(key), c_str(str(value))))
docs: Sets an attribute of the symbol.
  
          For example. A._set_attr(foo="bar") adds the mapping ``"{foo: bar}"``
          to the symbol's attribute dictionary.
  
          Parameters
          ----------
          **kwargs
              The attributes to set