def METHOD_NAME(self, table_name, watched=None):
    """
    Gets the title and year of the full list of movies from the table.
    :param table_name: The name of the movie table.
    :param watched: When specified, the returned list of movies is filtered to
                    either movies that have been watched or movies that have not
                    been watched. Otherwise, all movies are returned.
    :return: A list of movies in the table.
    """
    if watched is None:
        stmt = SimpleStatement(f"SELECT title, year from {table_name}")
        params = None
    else:
        stmt = SimpleStatement(
            f"SELECT title, year from {table_name} WHERE watched = %s ALLOW FILTERING")
        params = [watched]
    return self.session.execute(stmt, parameters=params).all()