def tuples_as_dict(tuples):
    """Transforms a list of tuples into a dict."""
    dct = {}
    tuples = [x for x in tuples if len(x) == 2]
    for first, second in tuples:
        dct[first] = second
    return dct