code: def _validate_dataloader_kwargs(
      dataloader_kwargs: Dict[str, Any], batch_size: Optional[int]
  ) -> None:
      if "shuffle" in dataloader_kwargs:
          if dataloader_kwargs["shuffle"]:
              raise ValueError(
                  "'shuffle' must be false for accurate sharding and checkpointing"
              )
      if "sampler" in dataloader_kwargs:
          raise ValueError(
              "Please remove 'sampler' arg as we will initialize a sampler automatically."
          )
      if "batch_sampler" in dataloader_kwargs:
          raise ValueError(
              "Please remove 'batch_sampler' arg as we will initialize "
              "a batch_sampler automatically."
          )
      if batch_size is not None:
          if "batch_size" in dataloader_kwargs:
              raise ValueError(
                  "batch_size is passed into torch_batch_process "
                  "and dataloader_kwargs"
              )
  
imports: import abc
  import json
  import logging
  import math
  import os
  import pathlib
  import uuid
  import warnings
  from typing import TYPE_CHECKING, Any, ContextManager, Dict, Optional, Set, Sized, Type
  import torch
  import torch.distributed
  from torch import nn
  from torch.utils import data
  import determined
  from determined import common, core, pytorch
label_desc: Use image node_id 7 for calling a global function with example usage: _validate_dataloader_kwargs(dataloader_kwargs, batch_size) without return types