def METHOD_NAME(name, cc_lib_name, srcs, kernel_deps, py_deps = [], **kwargs):
    native.cc_binary(
        name = cc_lib_name + ".so",
        deps = [cc_lib_name] + kernel_deps,
        linkshared = 1,
        copts = tf_copts(),
        **kwargs
    )
    native.py_library(
        name = name,
        srcs = srcs,
        srcs_version = "PY3",
        data = [cc_lib_name + ".so"],
        deps = py_deps,
        **kwargs
    )