code: def _run_format_and_flake8():
      files_changed = False
  
      try:
          check_bash_call("sh shell/lint.sh")
      except CalledProcessError:
          check_bash_call("sh shell/format.sh")
          files_changed = True
  
      if files_changed:
          print("Some files have changed.")
          print("Please do git add and git commit again")
      else:
          print("No formatting needed.")
  
      if files_changed:
          exit(1)
  
imports: from subprocess import CalledProcessError
  from subprocess import check_call
label_desc: Use image node_id 2 for calling a global function with example usage: _run_format_and_flake8() without return types