code: def fail_if_publish_binary_not_installed(
      binary, publish_target, install_link
  ):
      """Exit (with error message) if ``binary` isn't installed"""
      if not shutil.which(binary):
          click.secho(
              "Publishing to {publish_target} requires {binary} to be installed and configured".format(
                  publish_target=publish_target, binary=binary
              ),
              bg="red",
              fg="white",
              bold=True,
              err=True,
          )
          click.echo(
              f"Follow the instructions at {install_link}",
              err=True,
          )
          sys.exit(1)
  
file_path: datasette/datasette/publish/common.py
imports: from ..utils import StaticMount
  import click
  import os
  import shutil
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: fail_if_publish_binary_not_installed(binary, publish_target, install_link) without return types