Only if that function belongs to a mob with a client. If that function does not belong to a mob, or if it does but that mob has no client, then it can't work because of the absense of the client.
If that is a global function, there is no client variable unless you give it one. It can't know what client you want.
If that is a global function, there is no client variable unless you give it one. It can't know what client you want.