<｜begin▁of▁sentence｜>### Instruction:
As a genealogist, you may often find yourself mapping out family trees that detail the intricate connections between generations. Imagine you have a set of family records where individuals are designated as 'ancestors' and 'descendants.' The records indicate the number of descendants each ancestor has, as well as the number of ancestors each descendant comes from.

In a particular case, you've recorded that five ancestors have the following number of descendants respectively: one ancestor with 1 descendant, one with 2, and three with 1 each. Correspondingly, the descendants are documented to have ancestors as follows: one descendant with no ancestors in this dataset, one with 1 ancestor, one with 2 ancestors, and two with 1 ancestor each.

As you begin to diagram this family history, you ponder whether it's possible to create a directed lineage graph that accurately represents these relationships. Can you use the tools at your disposal, such as NetworkX within a genealogical analysis software, to verify if a directed family lineage graph can be structured to reflect this documented in-degree (number of ancestors) and out-degree (number of descendants) sequence?
### Response:
import networkx as nx

# Example directed graph
G = nx.DiGraph([(1, 2), (1, 3), (2, 3), (3, 4), (4, 2), (5, 1), (5, 4)])

# Construct degree sequences
in_sequence = [d for n, d in G.in_degree()]
out_sequence = [d for n, d in G.out_degree()]

# Check if the degree sequences are digraphic
is_digraphic = nx.is_digraphical(in_sequence, out_sequence)
print(f'The degree sequences are digraphic: {is_digraphic}')
<|EOT|>
