Thanks for your answer.
Yeah, i can see there are some customized rules in build_variables.py, which are required if i want to use it, but i’m still wondering how is this scripts used by the internal environment. Since this is still a python script, how could the syntax like load("@bazel_skylib//lib:new_sets.bzl", "sets") work?