I know this post is old, but wanted to share my solution using Robot Framework 5.0 with python 3.7
You should be able to import your library and then create a reference to it like such:
Import Library path/to/lib/DBConnections.py ${db_path} ${pwd} WITH NAME dbw
${dbwRef} = BuiltIn.Get Library Instance dbw
Import Library Queries.py ${dbwRef} WITH NAME dbquery
I hope this helps someone.
https://robotframework.org/robotframework/5.0/libraries/BuiltIn.html#Get%20Library%20Instance