def METHOD_NAME(gff_file, annotation,
                   seqid=None, source=None, is_stranded=True):
    """
    Write an :class:`Annotation` object into a GFF3 file.
    Each feature will get one entry for each location it has.
    :class:`Feature` objects with multiple locations require the ``ID``
    qualifier in its :attr:`Feature.qual` attribute.
    Parameters
    ----------
    gff_file : GFFFile
        The GFF3 file to write into.
    annotation : Annotation
        The annoation which is written to the GFF3 file.
    seqid : str, optional
        The content for the *seqid* column.
    source : str, optional
        The content for the *source* column.
    is_stranded : bool, optional
        If true, the strand of each feature is taken into account.
        Otherwise the *strand* column is filled with '``.``'.
    """
    for feature in sorted(annotation):
        if len(feature.locs) > 1 and "ID" not in feature.qual:
            raise ValueError(
                "The 'Id' qualifier is required "
                "for features with multiple locations"
            )
        ## seqid ##
        if seqid is not None and " " in seqid:
            raise ValueError("The 'seqid' must not contain whitespaces")
        ## source ##
        #Nothing to be done
        ## type ##
        type = feature.key
        ## strand ##
        # Expect same strandedness for all locations
        strand = list(feature.locs)[0].strand if is_stranded else None
        ## score ##
        score = None
        ## attributes ##
        attributes = feature.qual
        # The previous properties are shared by all entries
        # for this feature
        # The following loop handles properties that change with each
        # location
        reverse_order = True if strand == Location.Strand.REVERSE else False
        next_phase = 0
        for loc in sorted(
            feature.locs, key=lambda loc: loc.first, reverse=reverse_order
        ):
            ## start ##
            start = loc.first
            ## end ##
            end = loc.last
            ## strand ##
            strand = loc.strand if is_stranded else None
            ## phase ##
            if type == "CDS":
                phase = next_phase
                # Subtract the length of the location
                next_phase -= loc.last - loc.first + 1
                next_phase %= 3
            else:
                phase = None
            gff_file.append(
                seqid, source, type, start, end,
                score, strand, phase, attributes