code: def test_infer_pip_requirements_scopes_databricks_imports():
      mlflow.utils.requirements_utils._MODULES_TO_PACKAGES = None
      mlflow.utils.requirements_utils._PACKAGES_TO_MODULES = None
  
      with mock.patch(
          "mlflow.utils.requirements_utils._capture_imported_modules",
          return_value=[
              "databricks.automl",
              "databricks.model_monitoring",
              "databricks.automl_runtime",
          ],
      ), mock.patch(
          "mlflow.utils.requirements_utils._get_installed_version",
          return_value="1.0",
      ), mock.patch(
          "importlib_metadata.packages_distributions",
          return_value={
              "databricks": [
                  "databricks-automl-runtime",
                  "databricks-model-monitoring",
                  "koalas",
              ],
          },
      ):
          assert _infer_requirements("path/to/model", "sklearn") == [
              "databricks-automl-runtime==1.0",
              "databricks-model-monitoring==1.0",
          ]
          assert mlflow.utils.requirements_utils._MODULES_TO_PACKAGES[
              "databricks"
          ] == ["koalas"]
  
imports: import importlib
  import os
  import sys
  from unittest import mock
  import importlib_metadata
  import pytest
  import mlflow
  import mlflow.utils.requirements_utils
  from mlflow.utils.environment import infer_pip_requirements
  from mlflow.utils.requirements_utils import _capture_imported_modules, _get_installed_version, _get_pinned_requirement, _infer_requirements, _is_comment, _is_empty, _is_requirements_file, _join_continued_lines, _normalize_package_name, _parse_requirements, _prune_packages, _PyPIPackageIndex, _strip_inline_comment, _strip_local_version_label
label_desc: Use image node_id 18 for calling a global function with example usage: test_infer_pip_requirements_scopes_databricks_imports() without return types