def sparse_table_function(*, index, data) ->callable:
    """
	The very simplest Python-ish "sparse matrix", and plenty fast on modern hardware, for the
	size of tables this module will probably ever see, is an ordinary Python dictionary from
	<row,column> tuples to significant table entries. There are better ways if you program
	closer to the bare metal, but this serves the purpose.

	This routine unpacks "compressed-sparse-row"-style data into an equivalent Python dictionary,
	then returns a means to query said dictionary according to the expected 2-dimensional interface.
	"""
    hashmap = {}
    for row_id, (Cs, Ds) in enumerate(zip(index, data)):
        if isinstance(Ds, int):
            for column_id in Cs:
                hashmap[row_id, column_id] = Ds
        else:
            for column_id, d in (zip(Cs, Ds) if Cs else enumerate(Ds)):
                hashmap[row_id, column_id] = d
    return lambda R, C: hashmap.get((R, C))
