Need to run parameterized python files from Robotframework

I am running python files (as test cases) using the robotframework in my test automation framework. In this python file say I have some parameterized variables (say username). The values for these variables are stored in another python file (say and being passed in the file like:
import data
username =data.val_username

When I am running in my .robot file (say run.robot), how do I mention the reference of the file so that the file can fetch the variable values and run the test. Currently when I execute robot run.robot from the PyCharm’s terminal, it performs no actual action on the UI and exits with a test status as PASS in the console.

the one way You can get some variables from .py file into robot file is just calling them by its name while You are importing the file.
Let’s for example have with structure like:

username_variable = ‘some username’

Then You can import it as a variable in robot file and just call it like a simple variable by its name:

*** Settings *** 

*** Keywords ***
Some Keyword
[Arguments]   ${username}
log  ${username} 

*** Test Cases ***
[1] Some TC
Some Keyword username=${username_variable}

So in my opinion You may try to create function in that accepts some arguments and when You are calling Your in robotframework, simply pass the variables imported from
Hope it helps, br