code: def test_get_rendered_batch_size_grad_accum(
      effective_batch_size: Union[str, int],
      batch_size: Union[str, int],
      gradient_accumulation_steps: Union[str, int],
      num_workers: int,
      expected_batch_size: int,
      expected_grad_accum: int,
  ):
      config = ECDTrainerConfig.from_dict(
          {
              "effective_batch_size": effective_batch_size,
              "batch_size": batch_size,
              "gradient_accumulation_steps": gradient_accumulation_steps,
          }
      )
      (
          rendered_batch_size,
          rendered_grad_accum,
      ) = trainer_utils.get_rendered_batch_size_grad_accum(
          config, num_workers
      )
      assert rendered_batch_size == expected_batch_size
      assert rendered_grad_accum == expected_grad_accum
  
file_path: ludwig/tests/ludwig/utils/test_trainer_utils.py
imports: from collections import OrderedDict
  from typing import Union
  import pytest
  from ludwig.constants import AUTO, BATCH_SIZE, COMBINED, LOSS
  from ludwig.features.category_feature import CategoryOutputFeature
  from ludwig.features.feature_utils import LudwigFeatureDict
  from ludwig.schema.features.category_feature import ECDCategoryOutputFeatureConfig
  from ludwig.schema.trainer import ECDTrainerConfig
  from ludwig.schema.utils import load_config_with_kwargs
  from ludwig.utils import trainer_utils
  from ludwig.utils.metric_utils import TrainerMetric
label_desc: Use image node_id 7 for calling a global function with example usage: test_get_rendered_batch_size_grad_accum(effective_batch_size, batch_size, gradient_accumulation_steps, num_workers, expected_batch_size, expected_grad_accum) without return types