code: def set_local_rank(index: int) -> None:
      """Method to hint the local rank in case if torch native distributed context is created by user
      without using :meth:`~ignite.distributed.utils.initialize` or :meth:`~ignite.distributed.utils.spawn`.
  
      Args:
          index: local rank or current process index
  
      Examples:
          User set up torch native distributed process group
  
          .. code-block:: python
  
              import ignite.distributed as idist
  
              def run(local_rank, *args, **kwargs):
  
                  idist.set_local_rank(local_rank)
                  # ...
                  dist.init_process_group(**dist_info)
                  # ...
      """
      from ignite.distributed.comp_models.base import ComputationModel
  
      ComputationModel._ext_local_rank = index
  
imports: import socket
  from contextlib import contextmanager
  from functools import wraps
  from typing import Any, Callable, List, Mapping, Optional, Tuple, Union
  import torch
  from ignite.distributed.comp_models import _SerialModel, has_hvd_support, has_native_dist_support, has_xla_support, registered_computation_models
  from ignite.utils import setup_logger
label_desc: Use image node_id 19 for calling a global function with example usage: set_local_rank(index) without return types