Explicit load for py_library. (#2127)

BUG=http://b/291306662
diff --git a/ci/flatbuffers_for_tf_sync/build_defs.bzl b/ci/flatbuffers_for_tf_sync/build_defs.bzl
index 94516de..eaefb01 100644
--- a/ci/flatbuffers_for_tf_sync/build_defs.bzl
+++ b/ci/flatbuffers_for_tf_sync/build_defs.bzl
@@ -1,6 +1,7 @@
 """BUILD rules for generating flatbuffer files."""
 
 load("@build_bazel_rules_android//android:rules.bzl", "android_library")
+load("@rules_python//python:defs.bzl", "py_library")
 
 flatc_path = "@flatbuffers//:flatc"
 zip_files = "//tensorflow/lite/tools:zip_files"
@@ -449,7 +450,7 @@
             ":{}".format(all_srcs_no_include),
         ],
     )
-    native.py_library(
+    py_library(
         name = name,
         srcs = [
             ":{}".format(concat_py_srcs),
diff --git a/python/tflite_micro/signal/tflm_signal.bzl b/python/tflite_micro/signal/tflm_signal.bzl
index ff86a7b..9bf773e 100644
--- a/python/tflite_micro/signal/tflm_signal.bzl
+++ b/python/tflite_micro/signal/tflm_signal.bzl
@@ -1,5 +1,7 @@
 """Build rule for wrapping a custom TF OP from .cc to python."""
 
+load("@rules_python//python:defs.bzl", "py_library")
+
 # TODO(b/286890280): refactor to be more generic build target for any custom OP
 def py_tflm_signal_library(
         name,
@@ -61,7 +63,7 @@
             ] + select({"//conditions:default": []}),
         )
 
-    native.py_library(
+    py_library(
         name = name,
         srcs = srcs,
         srcs_version = "PY2AND3",
diff --git a/third_party/flatbuffers/build_defs.bzl b/third_party/flatbuffers/build_defs.bzl
index b7f98b9..1a84928 100644
--- a/third_party/flatbuffers/build_defs.bzl
+++ b/third_party/flatbuffers/build_defs.bzl
@@ -1,5 +1,7 @@
 """BUILD rules for generating flatbuffer files."""
 
+load("@rules_python//python:defs.bzl", "py_library")
+
 flatc_path = "@flatbuffers//:flatc"
 zip_files = "//tensorflow/lite/tools:zip_files"
 
@@ -446,7 +448,7 @@
             ":{}".format(all_srcs_no_include),
         ],
     )
-    native.py_library(
+    py_library(
         name = name,
         srcs = [
             ":{}".format(concat_py_srcs),