code: def default_hp_space_ray(trial) -> Dict[str, float]:
      from .integrations import is_ray_tune_available
  
      assert (
          is_ray_tune_available()
      ), "This function needs ray installed: `pip install ray[tune]`"
      from ray import tune
  
      return {
          "learning_rate": tune.loguniform(1e-6, 1e-4),
          "num_train_epochs": tune.choice(list(range(1, 6))),
          "seed": tune.uniform(1, 40),
          "per_device_train_batch_size": tune.choice(
              [4, 8, 16, 32, 64]
          ),
      }
  
imports: import copy
  import functools
  import gc
  import inspect
  import os
  import random
  import re
  import threading
  import time
  from typing import Any, Dict, List, NamedTuple, Optional, Tuple, Union
  import numpy
  from .utils import ExplicitEnum, is_psutil_available, is_tf_available, is_torch_available, is_torch_cuda_available, is_torch_tpu_available, requires_backends
label_desc: Use image node_id 7 for calling a global function with example usage: default_hp_space_ray(trial) and returns: dict