code: def objective(config):  # <1>
      train_loader, test_loader = load_data()  # Load some data
      model = ConvNet().to("cpu")  # Create a PyTorch conv net
      optimizer = torch.optim.SGD(  # Tune the optimizer
          model.parameters(),
          lr=config["lr"],
          momentum=config["momentum"],
      )
  
      while True:
          train(model, optimizer, train_loader)  # Train the model
          acc = test(model, test_loader)  # Compute test accuracy
          train.report({"mean_accuracy": acc})
  
file_path: ray/doc/source/tune/doc_code/pytorch_optuna.py
imports: import os
  from filelock import FileLock
  import torch.nn
  import torch.nn.functional
  from torchvision import datasets, transforms
  import torch
  from ray import train, tune
  from ray.tune.search.optuna import OptunaSearch
label_desc: Use image node_id 4 for calling a global function with example usage: objective(config) without return types