<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def split_hostmask(hostmask):
 """Splits a nick@host string into nick and host."""

    nick, _, host = hostmask.partition('@')
    nick, _, user = nick.partition('!')
    return nick, user or None, host or None