def bdev_opal_set_lock_state(client, bdev_name, user_id, password, lock_state):
    """set lock state for an opal bdev.

    Args:
        bdev_name: name of opal vbdev
        user_id: ID of the user who will set lock state
        password: password of the user
        lock_state: lock state to set
    """
    params = {
        'bdev_name': bdev_name,
        'user_id': user_id,
        'password': password,
        'lock_state': lock_state,
    }

    return client.call('bdev_opal_set_lock_state', params)