code: def __post_init__(self):
      if self.gpus_per_worker and not self.use_gpu:
          raise ValueError(
              "gpus_per_worker is set, but use_gpu is False. "
              "use_gpu must be True if gpus_per_worker is "
              "set. "
          )
      if (
          self.use_gpu
          and isinstance(self.gpus_per_worker, int)
          and self.gpus_per_worker < 1
      ):
          raise ValueError(
              f"gpus_per_worker must be >= 1: Got {self.gpus_per_worker}."
          )
      self.gpus_per_worker = self.gpus_per_worker or int(self.use_gpu)
  
file_path: horovod/horovod/ray/adapter.py
imports: from abc import ABC, abstractmethod
  from typing import Dict, Callable, Any, Optional, List
  from dataclasses import dataclass
label_desc: Use image node_id 1 for calling the BaseParams obj's underlying member method code with example usage: obj.__post_init__() without return types