code: def add_function_attribute(self, attr):
          
          if not self.is_function:
              raise ValueError('expected function value, got %s' % (self._kind,))
          attrname = str(attr)
          attrval = ffi.lib.LLVMPY_GetEnumAttributeKindForName(
              _encode_string(attrname), len(attrname))
          if attrval == 0:
              raise ValueError('no such attribute {!r}'.format(attrname))
          ffi.lib.LLVMPY_AddFunctionAttr(self, attrval)
docs: Only works on function value
  
          Parameters
          -----------
          attr : str
              attribute name