<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _initializeIndividualTable(pop, tc):
 """ Returns node ID -> individual map """

    # First, alive individuals:
    individal_nodes = {}
    for i in range(pop.N):
        individal_nodes[2*i] = i
        individal_nodes[2*i+1] = i
    metadata_strings = _generate_individual_metadata(pop.diploid_metadata, tc)

    # Now, preserved nodes
    num_ind_nodes = pop.N
    for i in pop.ancient_sample_metadata:
        assert i not in individal_nodes, "indivudal record error"
        individal_nodes[i.nodes[0]] = num_ind_nodes
        individal_nodes[i.nodes[1]] = num_ind_nodes
        num_ind_nodes += 1

    metadata_strings.extend(_generate_individual_metadata(
        pop.ancient_sample_metadata, tc))

    md, mdo = tskit.pack_bytes(metadata_strings)
    flags = [0 for i in range(pop.N+len(pop.ancient_sample_metadata))]
    tc.individuals.set_columns(flags=flags, metadata=md, metadata_offset=mdo)
    return individal_nodes