code: def test_capture_imported_modules_include_deps_by_params():
      class MyModel(mlflow.pyfunc.PythonModel):
          def predict(self, context, model_input, params=None):
              if params is not None:
                  import pandas as pd
                  import sklearn  # noqa: F401
  
                  return pd.DataFrame([params])
              return model_input
  
      params = {"a": 1, "b": "string", "c": True}
  
      with mlflow.start_run():
          model_info = mlflow.pyfunc.log_model(
              python_model=MyModel(),
              artifact_path="test_model",
              input_example=(["input1"], params),
          )
  
      captured_modules = _capture_imported_modules(
          model_info.model_uri, "pyfunc"
      )
      assert "pandas" in captured_modules
      assert "sklearn" in captured_modules
  
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 19 for calling a global function with example usage: test_capture_imported_modules_include_deps_by_params() and returns: model_input, pd