def METHOD_NAME(
        relative_labels = [],
        relative_labels_map = {},
        actual_subdir = "",
        add_deprecation_warning = False,
        tags = [],
        deps = [],
        **kwargs):
    """Generates aliases for drake_cc_library labels that have moved into a new
    package.  This is superior to native.alias() both for its brevity (it can
    generate many aliases at once), and because the deprecation message
    actually works (see https://github.com/bazelbuild/bazel/issues/5802).
    The relative_labels + relative_labels_map specify the correspondence.  For
    each label name foo in the relative_labels and relative_labels_map.keys(),
    this macro generates an alias to '//{actual_subdir}:{new_foo}' where
    new_foo for relative_labels is the same as foo, and new_foo for
    relative_labels_map is the value for the foo key.
    When add_deprecation_warning is true, the generated label in this package
    will have a deprecation warning explaining the new location.  When using
    this mode, the caller should probably set 'tags = ["manual"]' to avoid
    spurious warnings during 'bazel build //...'.
    """
    actual_subdir or fail("Missing required actual_subdir")
    mapping = _combine_relative_labels(relative_labels, relative_labels_map)
    for stub_relative_label, actual_relative_label in mapping.items():
        actual_full_label = "//" + actual_subdir + actual_relative_label
        if add_deprecation_warning:
            deprecation = ("Use the label " + actual_full_label)
        else:
            deprecation = None
        native.cc_library(
            name = stub_relative_label[1:],
            deps = deps + [actual_full_label],
            tags = tags + ["nolint"],
            deprecation = deprecation,
            **kwargs
        )
        native.alias(
            name = stub_relative_label[1:] + ".installed_headers",
            actual = actual_full_label + ".installed_headers",
        )