def _initializeIndividualTable(pop, tc):
<EOL>individal_nodes = {}<EOL>for i in range(pop.N):<EOL><INDENT>individal_nodes[<NUM_LIT:2>*i] = i<EOL>individal_nodes[<NUM_LIT:2>*i+<NUM_LIT:1>] = i<EOL><DEDENT>metadata_strings = _generate_individual_metadata(pop.diploid_metadata, tc)<EOL>num_ind_nodes = pop.N<EOL>for i in pop.ancient_sample_metadata:<EOL><INDENT>assert i not in individal_nodes, "<STR_LIT>"<EOL>individal_nodes[i.nodes[<NUM_LIT:0>]] = num_ind_nodes<EOL>individal_nodes[i.nodes[<NUM_LIT:1>]] = num_ind_nodes<EOL>num_ind_nodes += <NUM_LIT:1><EOL><DEDENT>metadata_strings.extend(_generate_individual_metadata(<EOL>pop.ancient_sample_metadata, tc))<EOL>md, mdo = tskit.pack_bytes(metadata_strings)<EOL>flags = [<NUM_LIT:0> for i in range(pop.N+len(pop.ancient_sample_metadata))]<EOL>tc.individuals.set_columns(flags=flags, metadata=md, metadata_offset=mdo)<EOL>return individal_nodes<EOL>
Returns node ID -> individual map