def METHOD_NAME(self, mock_float_inst):
    @overload(mock_float_inst)
    def dummy_to_float(x):
        if isinstance(x, self.DummyType):
            def codegen(x):
                return float(x.value)
            return codegen
        else:
            raise NumbaTypeError('cannot type float({})'.format(x))