code: def test_publish_cloudrun_extra_options(
      mock_call,
      mock_output,
      mock_which,
      extra_options,
      expected,
      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",
              "--extra-options",
              extra_options,
          ],
      )
      assert result.exit_code == 0
      dockerfile = (
          result.output.split("==== Dockerfile ====\n")[1]
          .split("\n====================\n")[0]
          .strip()
      )
      last_line = dockerfile.split("\n")[-1]
      extra_options = (
          last_line.split("--inspect-file inspect-data.json")[1]
          .split("--port")[0]
          .strip()
      )
      assert extra_options == expected
  
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 8 for calling a global function with example usage: test_publish_cloudrun_extra_options(mock_call, mock_output, mock_which, extra_options, expected, tmp_path_factory) without return types