How to pass the optional parameter in the robot file

Hello there,
I need your help.
My robot file is using the format BDD like this
Given App Is Opened
And The User Enters The Shortkey To Open The ‘Configurations’ Window
When The User Selects Multiple ‘${device_name}’ Devices
And The User Clicks On The ‘Next’ Button
Then The Current Device Should Be Displayed As ‘${expected_value}’

In the python file, e.g test.py, I defined the function as
@keyword(“The Current Device Should Be Displayed As ‘${expected_value}’'”)
def the_device_should_be_displayed(self, expected_value, index=None) → None:

My question is how I can pass the index value for the statement Then The Current Device Should Be Displayed As ‘${expected_value}’
Thanks