def METHOD_NAME(data_src, layout, ksize_src):
    img = fn.external_source(source=data_src, batch=True, layout=layout)
    ksize = fn.external_source(source=ksize_src)
    return fn.python_function(img, ksize, function=lambda im, ks: ref_func(im, ks, layout=layout),
                              batch_processing=False)