<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_credentials(self, user_name, password, domain, allow_interactive_logon):
 """Store login credentials that can be queried by guest operating systems with Additions installed. The credentials are transient to the session and the guest may also choose to erase them. Note that the caller cannot determine whether the guest operating system has queried or made use of the credentials. in user_name of type str User name string, can be empty in password of type str Password string, can be empty in domain of type str Domain name (guest logon scheme specific), can be empty in allow_interactive_logon of type bool Flag whether the guest should alternatively allow the user to interactively specify different credentials. This flag might not be supported by all versions of the Additions. raises :class:`VBoxErrorVmError` VMM device is not available. """

        if not isinstance(user_name, basestring):
            raise TypeError("user_name can only be an instance of type basestring")
        if not isinstance(password, basestring):
            raise TypeError("password can only be an instance of type basestring")
        if not isinstance(domain, basestring):
            raise TypeError("domain can only be an instance of type basestring")
        if not isinstance(allow_interactive_logon, bool):
            raise TypeError("allow_interactive_logon can only be an instance of type bool")
        self._call("setCredentials",
                     in_p=[user_name, password, domain, allow_interactive_logon])