code: def inf_kwargs(task):
      if task == "text-generation":
          return {
              "do_sample": False,
              "min_length": 50,
              "max_length": 50,
          }
      else:
          return {}
  
file_path: H2O/h2o_flexgen/benchmark/third_party/DeepSpeed/tests/unit/inference/test_model_profiling.py
imports: import os
  import time
  import pytest
  import torch
  import deepspeed
  from transformers import pipeline
  from unit.common import DistributedTest
label_desc: Use image node_id 2 for calling a global function with example usage: inf_kwargs(task) and returns: dict, dict