code: def create_rdzv_handler(
      params: RendezvousParameters,
  ) -> RendezvousHandler:
      if "rank" not in params.config:
          raise ValueError(
              "rank is absent in RendezvousParameters."
              "Try add --node-rank to the cmd request"
          )
      endpoint = params.endpoint.strip()
      if not endpoint:
          raise ValueError(
              "endpoint is absent in RendezvousParameters"
              "Try add --master-port and --master-addr to the cmd request"
          )
      master_addr, master_port = parse_rendezvous_endpoint(endpoint, -1)
      if master_port == -1:
          raise ValueError(
              f"Port is absent in endpoint: {endpoint}. Try launching with --master-port"
          )
      world_size = params.max_nodes
      rank = cast(int, params.config.get("rank"))
      run_id = params.run_id
      if "timeout" in params.config:
          timeout = int(params.config["timeout"])
      else:
          timeout = _default_timeout_seconds
      return StaticTCPRendezvous(
          master_addr, master_port, rank, world_size, run_id, timeout
      )
  
file_path: pytorch/torch/distributed/elastic/rendezvous/static_tcp_rendezvous.py
imports: import datetime
  import logging
  from typing import Tuple, cast, Optional
  from torch.distributed import Store, TCPStore, PrefixStore
  from torch.distributed.elastic.rendezvous import RendezvousHandler, RendezvousParameters
  from torch.distributed.elastic.rendezvous.utils import parse_rendezvous_endpoint
label_desc: Use image node_id 1 for calling a global function with example usage: create_rdzv_handler(params) and returns: StaticTCPRendezvous