code: def cmd_cmake(params=None, file="."):
      if params is None:
          params = ""
      elif isinstance(params, list) or isinstance(params, tuple):
          params = " ".join(params)
      else:
          params = str(params)
      return " ".join(
          [
              "{cmake}",
              "-DCMAKE_VERBOSE_MAKEFILE=ON",
              "-DCMAKE_RULE_MESSAGES:BOOL=OFF",
              "-DCMAKE_BUILD_TYPE=Release",
              f"{params}",
              '-G "NMake Makefiles"',
              f'"{file}"',
          ]
      )
  
imports: import os
  import shutil
  import struct
  import subprocess
  import sys
label_desc: Use image node_id 9 for calling a global function with example usage: cmd_cmake(params, file) and returns: str