code: def count_lines_and_get_fragment_starting_positions(
      file_name: Path, lines_per_dataset_fragment: int
  ) -> Tuple[int, List[int]]:
      """
      Returns number of lines in a file and indices of fragment starting bytes.
  
      Args:
          file_name: a path to a text or label file
          lines_per_dataset_fragment: number of lines in a dataset fragment. The last fragment can contain fewer lines
  
      Returns:
          num_lines: number of lines in a file
          start_bytes: indices of fragment starting bytes
      """
      pos = [0]
      with file_name.open() as f:
          i = 0
          line = f.readline()
          while line:
              i += 1
              if i % lines_per_dataset_fragment == 0:
                  pos.append(f.tell())
              line = f.readline()
      return i, pos[:-1] if i % lines_per_dataset_fragment == 0 else pos
  
imports: import inspect
  import json
  import multiprocessing
  import os
  import pickle
  import re
  import shutil
  import tempfile
  from collections import deque
  from pathlib import Path
  from typing import Any, Callable, Dict, Iterator, List, Optional, Set, Tuple, Type, Union
  import numpy
  import torch
  import webdataset
  from joblib import Parallel, delayed
  from omegaconf import DictConfig
  from torch.utils.data import IterableDataset
  from nemo.collections.common.tokenizers import TokenizerSpec
  from nemo.collections.nlp.data.token_classification.punctuation_capitalization_dataset import LABEL_ID_DIR_FOR_NEMO_CHECKPOINT, BertPunctuationCapitalizationDataset, Progress, create_label_ids, create_masks_and_segment_ids, load_label_ids, raise_not_equal_labels_error
  from nemo.collections.nlp.modules.common.tokenizer_utils import get_tokenizer
  from nemo.core.neural_types import AudioSignal, ChannelType, LabelsType, LengthsType, MaskType, NeuralType
  from nemo.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: count_lines_and_get_fragment_starting_positions(file_name, lines_per_dataset_fragment) and returns: i,  unknown