<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def hmset(key, **fieldsvals):
    '''
    Sets multiple hash fields to multiple values.

    .. versionadded:: 2017.7.0

    CLI Example:

    .. code-block:: bash

        salt '*' redis.hmset foo_hash bar_field1=bar_value1 bar_field2=bar_value2
    '''
    host = fieldsvals.pop('host', None)
    port = fieldsvals.pop('port', None)
    database = fieldsvals.pop('db', None)
    password = fieldsvals.pop('password', None)
    server = _connect(host, port, database, password)
    return server.hmset(key, salt.utils.args.clean_kwargs(**fieldsvals))