code: def set_attribute(library, session, attribute, attribute_state):
      
      return library.viSetAttribute(session, attribute, attribute_state)
docs: Sets the state of an attribute.
  
      Corresponds to viSetAttribute function of the VISA library.
  
      :param library: the visa library wrapped by ctypes.
      :param session: Unique logical identifier to a session.
      :param attribute: Attribute for which the state is to be modified. (Attributes.*)
      :param attribute_state: The state of the attribute to be set for the specified object.
      :return: return value of the library call.
      :rtype: :class:`pyvisa.constants.StatusCode`