code: def _blas_ilp64_pre_build_hook(cmd, ext, blas_info):
      # Determine BLAS symbol suffix/prefix, if any
      macros = dict(blas_info.get("define_macros", []))
      prefix = macros.get("BLAS_SYMBOL_PREFIX", "")
      suffix = macros.get("BLAS_SYMBOL_SUFFIX", "")
  
      if suffix:
          if not suffix.endswith("_"):
              # Symbol suffix has to end with '_' to be Fortran-compatible
              raise RuntimeError(
                  "BLAS/LAPACK has incompatible symbol suffix: "
                  "{!r}".format(suffix)
              )
  
          suffix = suffix[:-1]
  
      # When symbol prefix/suffix is present, we have to patch sources
      if prefix or suffix:
          include_dir = os.path.join(
              _get_build_src_dir(), "blas64-include"
          )
  
          fcompiler_flags = combine_dict(
              get_fcompiler_ilp64_flags(),
              get_fcompiler_macro_include_flags(include_dir),
          )
  
          # Add the include dir for C code
          if isinstance(ext, dict):
              ext.setdefault("include_dirs", [])
              ext["include_dirs"].append(include_dir)
          else:
              ext.include_dirs.append(include_dir)
  
          # Create name-mapping include files
          include_name_f = "blas64-prefix-defines.inc"
          include_name_c = "blas64-prefix-defines.h"
          include_fn_f = os.path.join(include_dir, include_name_f)
          include_fn_c = os.path.join(include_dir, include_name_c)
  
          text = ""
          for symbol in get_blas_lapack_symbols():
              text += "#define {} {}{}_{}\n".format(
                  symbol, prefix, symbol, suffix
              )
              text += "#define {} {}{}_{}\n".format(
                  symbol.upper(), prefix, symbol, suffix
              )
  
              # Code generation may give source codes with mixed-case names
              for j in (1, 2):
                  s = symbol[:j].lower() + symbol[j:].upper()
                  text += "#define {} {}{}_{}\n".format(
                      s, prefix, symbol, suffix
                  )
                  s = symbol[:j].upper() + symbol[j:].lower()
                  text += "#define {} {}{}_{}\n".format(
                      s, prefix, symbol, suffix
                  )
  
          write_file_content(include_fn_f, text)
  
          ctext = re.sub(
              r"^#define (.*) (.*)$",
              r"#define \1_ \2_",
              text,
              flags=re.M,
          )
          write_file_content(include_fn_c, text + "\n" + ctext)
  
          # Patch sources to include it
          def patch_source(filename, old_text):
              text = '#include "{}"\n'.format(include_name_f)
              text += old_text
              return text
  
      else:
          fcompiler_flags = get_fcompiler_ilp64_flags()
          patch_source = None
  
      return generic_pre_build_hook(
          cmd,
          ext,
          fcompiler_flags=fcompiler_flags,
          patch_source_func=patch_source,
          source_fnpart="_blas64",
      )
  
imports: import re
  import os
  import sys
  from distutils.util import get_platform
  import numpy
  from .system_info import combine_dict
label_desc: Use image node_id 11 for calling a global function with example usage: _blas_ilp64_pre_build_hook(cmd, ext, blas_info) and returns: generic_pre_build_hook, text