code: def infer_pip_requirements(model_uri, flavor, fallback=None):
      """Infers the pip requirements of the specified model by creating a subprocess and loading
      the model in it to determine which packages are imported.
  
      Args:
          model_uri: The URI of the model.
          flavor: The flavor name of the model.
          fallback: If provided, an unexpected error during the inference procedure is swallowed
              and the value of ``fallback`` is returned. Otherwise, the error is raised.
  
      Returns:
          A list of inferred pip requirements (e.g. ``["scikit-learn==0.24.2", ...]``).
  
      """
      try:
          return _infer_requirements(model_uri, flavor)
      except Exception:
          if fallback is not None:
              _logger.warning(
                  _INFER_PIP_REQUIREMENTS_FALLBACK_MESSAGE,
                  model_uri,
                  flavor,
                  fallback,
              )
              _logger.debug("", exc_info=True)
              return fallback
          raise
  
imports: import logging
  import os
  import re
  import subprocess
  import sys
  import tempfile
  import yaml
  from packaging.requirements import InvalidRequirement, Requirement
  from packaging.version import Version
  from mlflow.environment_variables import _MLFLOW_TESTING
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE
  from mlflow.utils import PYTHON_VERSION, insecure_hash
  from mlflow.utils.process import _exec_cmd
  from mlflow.utils.requirements_utils import _infer_requirements, _parse_requirements
  from mlflow.version import VERSION
label_desc: Use image node_id 9 for calling a global function with example usage: infer_pip_requirements(model_uri, flavor, fallback) and returns: _infer_requirements, fallback