code: def execute_catboost(
      mode,
      task_type,
      params,
      devices="0",
      stdout=None,
      timeout=None,
      env=None,
  ):
      if task_type not in ("CPU", "GPU"):
          raise Exception('task_type must be "CPU" or "GPU"')
  
      cmd = [get_catboost_binary_path(), mode, "--task-type", task_type]
  
      if isinstance(params, dict):
          for param in params.items():
              key = "{}".format(param[0])
              value = "{}".format(param[1])
              cmd.append(key)
              cmd.append(value)
      else:
          cmd.extend(params)
  
      if task_type == "GPU":
          cmd.extend(["--devices", devices, "--gpu-ram-part", "0.25"])
  
      mkl_cbwr_env = dict(env) if env else dict()
      mkl_cbwr_env.update(MKL_CBWR="SSE4_2")
      yatest.common.execute(
          cmd, stdout=stdout, timeout=timeout, env=mkl_cbwr_env
      )
  
imports: import os
  import pytest
  import re
  import sys
  import tempfile
  import time
  from .common_helpers import *
  import zipfile
  from testpath.tempdir import TemporaryDirectory
  import yatest.common.network
label_desc: Use image node_id 5 for calling a global function with example usage: execute_catboost(mode, task_type, params, devices, stdout, timeout, env) without return types