You need to make a in the database that you want to run it FROM, which connects to the database where the function resides. Then you can run it like this :

my_variable := My_function@db_link_name;