<｜begin▁of▁sentence｜>### Instruction:
Given a bipartite graph with bipartition sets {1, 2, 3, 4} and {'a', 'b', 'c', 'd'} and edge set [(1, 'a'), (1, 'b'), (2, 'b'), (2, 'c'), (3, 'c'), (4, 'a')], can you compute the maximum cardinality matching using the hopcroft_karp_matching function in NetworkX?
### Response:
import networkx as nx

# Create a bipartite graph
B = nx.Graph()
B.add_nodes_from([1, 2, 3, 4], bipartite=0)
B.add_nodes_from(['a', 'b', 'c', 'd'], bipartite=1)
B.add_edges_from([(1, 'a'), (1, 'b'), (2, 'b'), (2, 'c'), (3, 'c'), (4, 'a')])

# Compute the maximum cardinality matching of the bipartite graph
matching = nx.algorithms.bipartite.matching.hopcroft_karp_matching(B, top_nodes=[1, 2, 3, 4])
print("The matching is:", matching)
<|EOT|>
