def METHOD_NAME(self):
    try:
        import Metal
    except ImportError:
        logging.error("Failure to import Metal, please install pyobjc-framework-Metal")
        raise
    import objc
    dtype_out = vaex.dtype(self.return_dtype).numpy
    if dtype_out.name == "float64":
        dtype_out = np.dtype("float32")
        warnings.warn("Casting output from float64 to float32 since Metal does not support float64")
    ast_node = expresso.parse_expression(self.expression)
    cppcode = node_to_cpp(ast_node)
    typemap = {'float32': 'float',
               'float64': 'float'}  # we downcast!
    for name in vaex.array_types._type_names_int:
        typemap[name] = f'{name}_t'
    typenames = [typemap[dtype.name] for dtype in self.argument_dtypes]
    metal_args = [f'const device {typename} *{name}_array [[buffer({i})]]' for i, (typename, name) in
                  enumerate(zip(typenames, self.arguments))]
    code_get_scalar = [f'    {typename} {name} = {name}_array[id];\n' for typename, name, in zip(typenames, self.arguments)]
    sourcecode = '''