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

def clear(zpool, device=None):
    '''
    Clears device errors in a pool.

    .. warning::

        The device must not be part of an active pool configuration.

    zpool : string
        name of storage pool
    device : string
        (optional) specific device to clear

    .. versionadded:: 2018.3.1

    CLI Example:

    .. code-block:: bash

        salt '*' zpool.clear mypool
        salt '*' zpool.clear mypool /path/to/dev

    '''
    ## Configure pool
    # NOTE: initialize the defaults
    target = []

    # NOTE: append the pool name and specifications
    target.append(zpool)
    target.append(device)

    ## clear storage pool errors
    res = __salt__['cmd.run_all'](
        __utils__['zfs.zpool_command'](
            command='clear',
            target=target,
        ),
        python_shell=False,
    )

    return __utils__['zfs.parse_command_result'](res, 'cleared')