class_docstr: Take a TSV file, split into N pieces (by byte location) and return
  an iterator on one of the pieces.  The pieces are equal by byte size,
  not by number of rows.  Thus, care needs to be taken when using this
  for distributed training, otherwise number of batches for different
  workers might be different.
class_docstr_tok: ["Take","a","TSV","file",",","split","into","N","pieces","(","by","byte","location",")","and","return","an","iterator","on","one","of","the","pieces",".","The","pieces","are","equal","by","byte","size",",","not","by","number","of","rows",".","Thus",",","care","needs","to","be","taken","when","using","this","for","distributed","training",",","otherwise","number","of","batches","for","different","workers","might","be","different","."]
code: def __init__(
      self,
      file,
      field_names=None,
      delimiter="\t",
      quoted=False,
      block_id=0,
      num_blocks=1,
      drop_incomplete_rows=False,
  ):
      self.file = file
      self.field_names = field_names
      self.delimiter = delimiter
      self.quoted = quoted
      self.block_id = block_id
      self.num_blocks = num_blocks
      self.drop_incomplete_rows = drop_incomplete_rows
      csv.field_size_limit(sys.maxsize)
  
imports: import csv
  import logging
  import sys
  import threading
  from typing import Dict, List, Optional, Type
  from pytext.utils.path import get_absolute_path
  from .data_source import generator_property, RootDataSource, SafeFileWrapper, ShardedDataSource
  from .session import SessionDataSource
label_desc: Use image node_id 1 to create a new BlockShardedTSV object  with example: obj = BlockShardedTSV(file, field_names, delimiter, quoted, block_id, num_blocks, drop_incomplete_rows)