code: def _calc_incoming_device_range(i, rank, world_size, sub_seq_length):
      device_of_incoming_k = (rank - i - 1) % world_size
      start_idx = sub_seq_length * device_of_incoming_k
      end_idx = sub_seq_length * (device_of_incoming_k + 1)
      return start_idx, end_idx
  
label_desc: Use image node_id 1 for calling a global function with example usage: _calc_incoming_device_range(i, rank, world_size, sub_seq_length) and returns: start_idx,  end_idx