Return the object the function f is in.
If f is a global function defined in the runtime 0 (zero)
will be returned.
Zero will also be returned if f is a constant in the
parent class. In that case function_program() can be
used to get the parent program.