code: def save_model(
      h2o_model,
      path,
      conda_env=None,
      code_paths=None,
      mlflow_model=None,
      signature=None,
      input_example=None,
      pip_requirements=None,
      extra_pip_requirements=None,
      model_type="MOJO",
      extra_prediction_args=[],
  ):
      """
      Saves an H2O binary model to a path on the local file system in MOJO or POJO format.
  
      :param h2o_model: H2O binary model to be saved to MOJO or POJO.
      :param path: Local path where the model is to be saved.
      :param conda_env: {{ conda_env }}
      :param code_paths: A list of local filesystem paths to Python file dependencies (or directories
                         containing file dependencies). These files are *prepended* to the system
                         path when the model is loaded.
      :param mlflow_model: :py:mod:`mlflow.models.Model` this flavor is being added to.
  
      :param signature: {{ signature }}
      :param input_example: {{ input_example }}
      :param pip_requirements: {{ pip_requirements }}
      :param extra_pip_requirements: {{ extra_pip_requirements }}
      :param model_type: A flag deciding whether the model is MOJO or POJO.
      :param extra_prediction_args: A list of extra arguments for java predictions process. Possible values:
                                    --setConvertInvalidNum - Converts invalid numbers to NA
                                    --predictContributions - Returns also Shapley values a long with the predictions
                                    --predictCalibrated - Return also calibrated prediction values.
      """
  
      import h2o
  
      model_type_upper = model_type.upper()
      if model_type_upper != "MOJO" and model_type_upper != "POJO":
          raise ValueError(
              f"The `model_type` parameter must be 'MOJO' or 'POJO'. The passed value was '{model_type}'."
          )
  
      _validate_env_arguments(
          conda_env, pip_requirements, extra_pip_requirements
      )
      _validate_and_prepare_target_save_path(path)
      code_dir_subpath = _validate_and_copy_code_paths(code_paths, path)
  
      if model_type_upper == "MOJO":
          model_data_path = h2o_model.download_mojo(
              path=path, get_genmodel_jar=True
          )
          model_file = os.path.basename(model_data_path)
      else:
          model_data_path = h2o_model.download_pojo(
              path=path, get_genmodel_jar=True
          )
          h2o_genmodel_jar = os.path.join(path, "h2o-genmodel.jar")
          output_path = os.path.join(path, "classes")
          javac_cmd = [
              "javac",
              "-cp",
              h2o_genmodel_jar,
              "-d",
              output_path,
              "-J-Xmx12g",
              model_data_path,
          ]
          subprocess.check_call(javac_cmd)
          model_file = os.path.basename(model_data_path).replace(
              ".java", ""
          )
  
      if mlflow_model is None:
          mlflow_model = Model()
      if signature is not None:
          mlflow_model.signature = signature
      if input_example is not None:
          _save_example(mlflow_model, input_example, path)
  
      pyfunc.add_to_model(
          mlflow_model,
          loader_module="h2o_mlflow_flavor",
          model_path=model_file,
          conda_env=_CONDA_ENV_FILE_NAME,
          python_env=_PYTHON_ENV_FILE_NAME,
          code=code_dir_subpath,
      )
  
      mlflow_model.add_flavor(
          FLAVOR_NAME,
          model_file=model_file,
          model_type=model_type_upper,
          extra_prediction_args=extra_prediction_args,
          relevant_columns=_get_relevant_columns(h2o_model),
          h2o_version=h2o.__version__,
          code=code_dir_subpath,
      )
      mlflow_model.save(os.path.join(path, MLMODEL_FILE_NAME))
  
      if conda_env is None:
          if pip_requirements is None:
              default_reqs = get_default_pip_requirements()
              inferred_reqs = mlflow.models.infer_pip_requirements(
                  path, FLAVOR_NAME, fallback=default_reqs
              )
              default_reqs = sorted(
                  set(inferred_reqs).union(default_reqs)
              )
          else:
              default_reqs = None
          (
              conda_env,
              pip_requirements,
              pip_constraints,
          ) = _process_pip_requirements(
              default_reqs, pip_requirements, extra_pip_requirements
          )
      else:
          (
              conda_env,
              pip_requirements,
              pip_constraints,
          ) = _process_conda_env(conda_env)
  
      with open(os.path.join(path, _CONDA_ENV_FILE_NAME), "w") as f:
          yaml.safe_dump(conda_env, stream=f, default_flow_style=False)
  
      if pip_constraints:
          write_to(
              os.path.join(path, _CONSTRAINTS_FILE_NAME),
              "\n".join(pip_constraints),
          )
  
      write_to(
          os.path.join(path, _REQUIREMENTS_FILE_NAME),
          "\n".join(pip_requirements),
      )
  
      _PythonEnv.current().to_yaml(
          os.path.join(path, _PYTHON_ENV_FILE_NAME)
      )
  
imports: import logging
  import os
  import tempfile
  import pandas
  import subprocess
  import sys
  import yaml
  import mlflow
  from mlflow import pyfunc
  from mlflow.models import Model
  from mlflow.models.model import MLMODEL_FILE_NAME
  from mlflow.models.utils import _save_example
  from mlflow.models import ModelSignature, ModelInputExample
  from mlflow.utils.environment import _CONDA_ENV_FILE_NAME, _CONSTRAINTS_FILE_NAME, _PYTHON_ENV_FILE_NAME, _REQUIREMENTS_FILE_NAME, _mlflow_conda_env, _process_conda_env, _process_pip_requirements, _PythonEnv, _validate_env_arguments
  from mlflow.utils.file_utils import write_to
  from mlflow.utils.model_utils import _get_flavor_configuration, _validate_and_copy_code_paths, _validate_and_prepare_target_save_path
  from mlflow.tracking.artifact_utils import _download_artifact_from_uri
  from mlflow.utils.requirements_utils import _get_pinned_requirement
label_desc: Use image node_id 7 for calling a global function with example usage: save_model(h2o_model, path, conda_env, code_paths, mlflow_model, signature, input_example, pip_requirements, extra_pip_requirements, model_type, extra_prediction_args) without return types