def create_read1_overlay(dataset):
    """Create an overlay that is True where the read is read 1 of a pair."""

    illumina_metadata = dataset.get_overlay('illumina_metadata')

    def is_read1(identifier):
        try:
            return illumina_metadata[identifier]['read'] == 1
        except TypeError:
            return False

    read1_overlay = {i: is_read1(i) for i in dataset.identifiers}

    dataset.put_overlay('is_read1', read1_overlay)