code: def set_split_factor(
      factor: float,
      /,
      *,
      device: Optional[Union[ivy.Device, ivy.NativeDevice]] = None,
  ) -> None:
      """Set the global split factor for a given device, which can be used to
      scale batch splitting chunk sizes for the device across the codebase.
  
      Parameters
      ----------
      factor
          The factor to set the device-specific split factor to.
      device
          The device to set the split factor for. Sets the default device by default.
  
      Examples
      --------
      >>> print(ivy.default_device())
      cpu
  
      >>> ivy.set_split_factor(0.5)
      >>> print(ivy.split_factors)
      {'cpu': 0.5}
  
      >>> import torch
      >>> ivy.set_backend("torch")
      >>> device = torch.device("cuda")
      >>> ivy.set_split_factor(0.3, device=device)
      >>> print(ivy.split_factors)
      {device(type='cuda'): 0.3}
  
      >>> ivy.set_split_factor(0.4, device="tpu")
      >>> print(ivy.split_factors)
      {'tpu': 0.4}
  
      >>> import torch
      >>> ivy.set_backend("torch")
      >>> device = torch.device("cuda")
      >>> ivy.set_split_factor(0.2)
      >>> ivy.set_split_factor(0.3, device='gpu')
      >>> print(ivy.split_factors)
      {'cpu': 0.2, 'gpu': 0.3}
      """
      ivy.utils.assertions.check_less(
          0, factor, allow_equal=True, as_array=False
      )
      global split_factors
      device = ivy.default(device, default_device())
      split_factors[device] = factor
  
imports: import os
  import gc
  import abc
  import math
  import psutil
  import warnings
  import types
  from typing import Type, Optional, Tuple
  from typing import Union, Callable, Iterable, Any
  import ivy
  from ivy.func_wrapper import handle_out_argument, to_native_arrays_and_back, inputs_to_native_arrays, handle_nestable, handle_array_like_without_promotion, handle_backend_invalid
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 26 for calling a global function with example usage: set_split_factor() without return types