code: def generate_offsets(filename):
      offsets = []
      with open(filename) as f:
          offsets.append(f.tell())
          while f.readline():
              offsets.append(f.tell())
      return offsets
  
file_path: pytext/pytext/legacy/datasets/unsupervised_learning.py
imports: import os
  import torch
  from torchtext.data.functional import custom_replace, simple_space_split
  from torchtext.utils import download_from_url, extract_archive
  from ..vocab import build_vocab_from_iterator
label_desc: Use image node_id 1 for calling a global function with example usage: generate_offsets(filename) and returns: offsets