code: def test_publish_cloudrun_apt_get_install(
      mock_call, mock_output, mock_which, tmp_path_factory
  ):
      mock_which.return_value = True
      mock_output.return_value = "myproject"
  
      runner = CliRunner()
      os.chdir(tmp_path_factory.mktemp("runner"))
      with open("test.db", "w") as fp:
          fp.write("data")
      result = runner.invoke(
          cli.cli,
          [
              "publish",
              "cloudrun",
              "test.db",
              "--service",
              "datasette",
              "--show-files",
              "--secret",
              "x-secret",
              "--apt-get-install",
              "ripgrep",
              "--spatialite",
          ],
      )
      assert result.exit_code == 0
      dockerfile = (
          result.output.split("==== Dockerfile ====\n")[1]
          .split("\n====================\n")[0]
          .strip()
      )
      expected = textwrap.dedent(
          r"""
      FROM python:3.11.0-slim-bullseye
      COPY . /app
      WORKDIR /app
  
      RUN apt-get update && \
          apt-get install -y ripgrep python3-dev gcc libsqlite3-mod-spatialite && \
          rm -rf /var/lib/apt/lists/*
  
      ENV DATASETTE_SECRET 'x-secret'
      ENV SQLITE_EXTENSIONS '/usr/lib/x86_64-linux-gnu/mod_spatialite.so'
      RUN pip install -U datasette
      RUN datasette inspect test.db --inspect-file inspect-data.json
      ENV PORT 8001
      EXPOSE 8001
      CMD datasette serve --host 0.0.0.0 -i test.db --cors --inspect-file inspect-data.json --setting force_https_urls on --port $PORT
      """
      ).strip()
      assert expected == dockerfile
  
file_path: datasette/tests/test_publish_cloudrun.py
imports: from click.testing import CliRunner
  from datasette import cli
  from unittest import mock
  import json
  import os
  import pytest
  import textwrap
label_desc: Use image node_id 7 for calling a global function with example usage: test_publish_cloudrun_apt_get_install(mock_call, mock_output, mock_which, tmp_path_factory) without return types