def set_function(self, f):
def samples(self):<EOL><INDENT>return (('<STR_LIT>', {}, float(f())),)<EOL><DEDENT>self._child_samples = types.MethodType(samples, self)<EOL>
Call the provided function to return the Gauge value.

        The function must return a float, and may be called from
        multiple threads. All other methods of the Gauge become NOOPs.