<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_user(self, user_id):
 """ Get user details. :param user_id: Identification of user by username (str) or user ID (int) :returns: User details as strings in dictionary with these keys for RT users: * Lang * RealName * Privileged * Disabled * Gecos * EmailAddress * Password * id * Name Or these keys for external users (e.g. Requestors replying to email from RT: * RealName * Disabled * EmailAddress * Password * id * Name None is returned if user does not exist. :raises UnexpectedMessageFormat: In case that returned status code is not 200 """

        msg = self.__request('user/{}'.format(str(user_id), ))
        status_code = self.__get_status_code(msg)
        if (status_code == 200):
            pairs = {}
            lines = msg.split('\n')
            if (len(lines) > 2) and self.RE_PATTERNS['does_not_exist_pattern'].match(lines[2]):
                return None
            for line in lines[2:]:
                if ': ' in line:
                    header, content = line.split(': ', 1)
                    pairs[header.strip()] = content.strip()
            return pairs
        else:
            raise UnexpectedMessageFormat('Received status code is {:d} instead of 200.'.format(status_code))