code: def run_transformers():
      from datasets import Dataset
      from transformers import Trainer, TrainingArguments
  
      from ray.train.huggingface.transformers import (
          RayTrainReportCallback,
          prepare_trainer,
      )
  
      def train_func():
          # Create dummy model and datasets
          dataset = Dataset.from_dict(
              {"text": ["text1", "text2"], "label": [0, 1]}
          )
          model = torch.nn.Linear(10, 10)
  
          # Test Transformers utilites
          training_args = TrainingArguments(
              output_dir="./results", no_cuda=True
          )
          trainer = Trainer(
              model=model, args=training_args, train_dataset=dataset
          )
  
          trainer.add_callback(RayTrainReportCallback())
          trainer = prepare_trainer(trainer)
  
      trainer = TorchTrainer(
          train_func,
          scaling_config=ScalingConfig(num_workers=2, use_gpu=False),
      )
  
      trainer.fit()
  
file_path: ray/python/ray/train/tests/test_train_usage.py
imports: import pytest
  import torch
  import ray
  from ray.train import ScalingConfig
  from ray.train.torch import TorchTrainer
label_desc: Use image node_id 4 for calling a global function with example usage: run_transformers() without return types