This is exactly how you do it. Though, you'll probably want to support the ability to pass additional arguments. Why do you think it's not working? Are you getting an error?
For example, put the following in a file named "mykeywords.py":
from robot.libraries.BuiltIn import BuiltIn
def call_keyword(keyword, *args, **kwargs):
return BuiltIn().run_keyword(keyword, *args, **kwargs)
In the same folder, create a robot file that looks like this:
*** Settings ***
Library mykeywords.py
*** Test Cases ***
Example
call keyword log to console hello, world