def left_join(table_a, table_b, test):
    "Runs and returns result from left joining two tables together."
    assert sum(isinstance(table, tuple) for table in (table_a, table_b)) > 0, \
        'At least one table must be given a name!'
    ta, pa = table_a if isinstance(table_a, tuple) else (table_a, '_')
    tb, pb = table_b if isinstance(table_b, tuple) else (table_b, '_')
    table = _composite_table(pa, pb, ta, tb)
    _join_loop(table, test, pa, pb, ta, tb, False, False)
    return table
Runs and returns result from left joining two tables together.
recipes/Python/577825_Rudimentary_Database_Engine/recipe-577825.py