def fmt_part(part, node_labels=None):
    """Format a |Part|.

    The returned string looks like::

        0,1
        ───
         ∅
    """
    def nodes(x):  # pylint: disable=missing-docstring
        return ','.join(labels(x, node_labels)) if x else EMPTY_SET

    numer = nodes(part.mechanism)
    denom = nodes(part.purview)

    width = max(3, len(numer), len(denom))
    divider = HORIZONTAL_BAR * width

    return (
        '{numer:^{width}}\n'
        '{divider}\n'
        '{denom:^{width}}'
    ).format(numer=numer, divider=divider, denom=denom, width=width)
Format a |Part|.

    The returned string looks like::

        0,1
        ───
         ∅