code: def main(simd_width):
      print_copyright()
      print_note()
  
      struct_name = f"UnpackBits{simd_width}"
  
      # NOTE: templating the UnpackBits struct on the dispatch level avoids
      # potential name collisions if there are several UnpackBits generations
      # with the same SIMD width on a given architecture.
  
      print(
          dedent(
              f"""\
          #pragma once
  
          #include <cstdint>
          #include <cstring>
  
          #include <xsimd/xsimd.hpp>
  
          #include "arrow/util/dispatch.h"
          #include "arrow/util/ubsan.h"
  
          namespace arrow {{
          namespace internal {{
          namespace {{
  
          using ::arrow::util::SafeLoad;
  
          template <DispatchLevel level>
          struct {struct_name} {{
  
          using simd_batch = xsimd::make_sized_batch_t<uint32_t, {simd_width//32}>;
          """
          )
      )
  
      gen = UnpackGenerator(simd_width)
      gen.print_unpack_bit0_func()
      print()
      for i in range(1, 32):
          gen.print_unpack_bit_func(i)
          print()
      gen.print_unpack_bit32_func()
      print()
  
      print(
          dedent(
              f"""\
          }};  // struct {struct_name}
  
          }}  // namespace
          }}  // namespace internal
          }}  // namespace arrow
          """
          )
      )
  
file_path: arrow/cpp/src/arrow/util/bpacking_simd_codegen.py
imports: from functools import partial
  import sys
  from textwrap import dedent, indent
label_desc: Use image node_id 3 for calling a global function with example usage: main(simd_width) without return types