def METHOD_NAME(args):
    with open(args.test_matrix_file, 'r') as fhandle:
        test_matrix = parse_matrix(fhandle)
    if not test_matrix:
        print("Matrix could not be determined", file=sys.stderr)
        sys.exit(1)
    def argument_filter(case):
        if args.dist:
            if case['DIST'] != args.dist:
                return False
        if args.python:
            if case['PYTHON'] != args.python:
                return False
        if args.suite:
            if case['SUITE'] != args.suite:
                return False
        if args.database:
            if case['RDBMS'] != args.database:
                return False
        return True
    test_matrix = list(filter(argument_filter, test_matrix))
    if len(test_matrix) == 0:
        print("No more test cases after filtering. Exiting..", file=sys.stderr)
        sys.exit(0)
    return test_matrix