import json


def get_owner_ids(json_filename):
    """Return a set with all the owner IDs in posts from ‘json_filename’."""
    with open(json_filename, 'r', newline='') as json_file:
        owner_ids = set()
        for line in json_file:
            json_dict = json.loads(line)['_node']
            owner_ids.add(int(json_dict['owner']['id']))
    return owner_ids