code: def get_mpi_flags():
      show_command = os.environ.get(
          "BLUEFOG_MPICXX_SHOW", "mpicxx -show"
      )
      try:
          mpi_show_output = subprocess.check_output(
              shlex.split(show_command), universal_newlines=True
          ).strip()
          mpi_show_args = shlex.split(mpi_show_output)
          if not mpi_show_args[0].startswith("-"):
              # Open MPI and MPICH print compiler name as a first word, skip it
              mpi_show_args = mpi_show_args[1:]
          # strip off compiler call portion and always escape each arg
          return " ".join(
              [
                  '"' + arg.replace('"', '"\'"\'"') + '"'
                  for arg in mpi_show_args
              ]
          )
      except Exception:
          raise DistutilsPlatformError(
              "%s failed (see error below), is MPI in $PATH?\n"
              "Note: If your version of MPI has a custom command to show compilation flags, "
              "please specify it with the BLUEFOG_MPICXX_SHOW environment variable.\n\n"
              "%s" % (show_command, traceback.format_exc())
          )
  
imports: import copy
  import os
  import re
  import shlex
  import subprocess
  import sys
  import textwrap
  import shlex
  import traceback
  from typing import List
  from distutils.errors import CompileError, DistutilsError, DistutilsPlatformError, DistutilsSetupError, LinkError
  from distutils.version import LooseVersion
  from setuptools import find_packages, setup, Extension
  from setuptools.command.build_ext import build_ext
  from bluefog import __version__
label_desc: Use image node_id 6 for calling a global function with example usage: get_mpi_flags() and returns: str