def read_partition_file(filename):
 for (record_index, record) in enumerate(screed.open(filename)):
  (_, partition_id) = record.name.rsplit(' DCTB ', 1)
  (yield (record_index, record, int(partition_id)))

def read_partition_file ( filename ) : for ( record_index , record ) in enumerate ( screed . open ( filename ) ) : ( _ , partition_id ) = record . name . rsplit ( ' DCTB ' , 1 ) ( yield ( record_index , record , int ( partition_id ) ) )
utility function to get partitioned reads from file .