def sectionStrFromNode(app, n, lang="en", lastSlot=False, fillup=False):
    """The heading of a section to which a node belongs.

    Compare `tf.core.text.Text.nodeFromSection`.

    node: integer
        The node from which we obtain a section specification.
    lastSlot: boolean, optional `False`
        Whether the reference node will be the last slot contained by the
        `node` argument or the first node.
        Otherwise it will be the first slot.
    lang: string, optional `en`
        The language assumed for the section parts,
        as far as they are language dependent.
        Must be a 2-letter language code.
    fillup: boolean, optional `False`
        Same as for `tf.core.text.Text.sectionTuple`.

    Returns
    -------
    section heading:string
        Corresponds to the reference node.
        The result is built from the labels of the individual section levels,
        with dummies for missing parts if *fillup* is true.
    """

    api = app.api
    T = api.T

    aContext = app.context
    sep1 = aContext.sectionSep1
    sep2 = aContext.sectionSep2

    seps = ("", sep1, sep2)

    section = T.sectionFromNode(n, lang=lang, lastSlot=lastSlot, fillup=fillup)
    return "".join(
        "" if part is None else f"{seps[i]}{part}" for (i, part) in enumerate(section)
    )