code: def buildx_options_group(f: F[t.Any]):
      import click
      from click_option_group import optgroup
  
      optgroup_option = partial(compatible_option, factory=optgroup)
  
      buildx = [
          optgroup_option(
              "--allow",
              equivalent=("opt", "allow=network.host"),
              multiple=True,
              metavar="ENTITLEMENT",
              help="Allow extra privileged entitlement (e.g., ``network.host``, ``security.insecure``).",
          ),
          optgroup_option(
              "--attest",
              equivalent=("opt", "attest=type=sbom,generator=image"),
              multiple=True,
              metavar="[NAME|type=TYPE[,KEY=VALUE]]",
              help="Attestation parameter (e.g., ``type=local,ref=path/to/dir``).",
          ),
          optgroup_option(
              "--build-context",
              equivalent=(
                  "opt",
                  "build-context=project=path/to/project/source",
              ),
              multiple=True,
              metavar="name=VALUE",
              help="Additional build contexts (e.g., ``name=path``).",
          ),
          optgroup_option(
              "--builder",
              equivalent=("opt", "builder=default"),
              type=click.STRING,
              help="Override the configured builder instance. Same as ``docker buildx --builder``",
          ),
          optgroup_option(
              "--cache-to",
              multiple=True,
              equivalent=("opt", "cache-to=type=registry,ref=user/app"),
              metavar="[NAME|type=TYPE[,KEY=VALUE]]",
              help="Cache export destinations (e.g., ``user/app:cache``, ``type=local,dest=path/to/dir``).",
          ),
          optgroup_option(
              "--load",
              is_flag=True,
              equivalent=("opt", "load"),
              default=False,
              help="Shorthand for ``--output=type=docker``. Note that ``--push`` and ``--load`` are mutually exclusive.",
          ),
          optgroup_option(
              "--push",
              is_flag=True,
              equivalent=("opt", "push"),
              default=False,
              help="Shorthand for ``--output=type=registry``. Note that ``--push`` and ``--load`` are mutually exclusive.",
          ),
          optgroup_option(
              "--provenance",
              equivalent=("opt", "provenance=generator=image"),
              type=click.STRING,
              help="Shorthand for ``--attest=type=provenance``.",
          ),
          optgroup_option(
              "--quiet",
              is_flag=True,
              equivalent=("opt", "quiet"),
              default=False,
              help="Suppress the build output and print image ID on success",
          ),
          optgroup_option(
              "--cgroup-parent",
              equivalent=("opt", "cgroup-parent=cgroupv2"),
              type=click.STRING,
              default=None,
              help="Optional parent cgroup for the container.",
          ),
          optgroup_option(
              "--ulimit",
              equivalent=("opt", "ulimit=nofile=1024:1024"),
              type=click.STRING,
              metavar="<type>=<soft limit>[:<hard limit>]",
              default=None,
              help="Ulimit options.",
          ),
          optgroup_option(
              "--no-cache-filter",
              equivalent=("opt", "no-cache-filter"),
              multiple=True,
              help="Do not cache specified stages.",
          ),
          optgroup_option(
              "--metadata-file",
              type=click.STRING,
              equivalent=("opt", "metadata-file=/path/to/file"),
              help="Write build result metadata to the file.",
          ),
          optgroup_option(
              "--sbom",
              equivalent=("opt", "sbom=generator=image"),
              type=click.STRING,
              help="Shorthand for ``--attest=type=sbom``.",
          ),
          optgroup_option(
              "--shm-size",
              equivalent=("opt", "shm-size=8192Mb"),
              help="Size of ``/dev/shm``.",
          ),
      ]
      for options in reversed(buildx):
          f = options(f)
      return f
  
file_path: BentoML/src/bentoml_cli/containerize.py
imports: from __future__ import annotations
  import itertools
  import logging
  import shutil
  import subprocess
  import sys
  import tempfile
  import typing
  from functools import partial
label_desc: Use image node_id 3 for calling a global function with example usage: buildx_options_group(f) and returns: f