improve docs, add definition for call_function in script context