def members(cluster_names: List[str], group: Optional[int], fmt: str,
            watch: Optional[int], w: bool, extended: bool, ts: bool) -> None:
    """Process ``list`` command of ``patronictl`` utility.

    Print information about the Patroni cluster through :func:`output_members`.

    :param cluster_names: name of clusters that should be printed. If ``None`` consider only the cluster present in
        ``scope`` key of the configuration.
    :param group: filter which Citus group we should get members from. Refer to the module note for more details.
    :param fmt: the output table printing format. See :func:`print_output` for available options.
    :param watch: if given print output every *watch* seconds.
    :param w: if ``True`` print output every 2 seconds.
    :param extended: if extended information should be printed. See ``extended`` argument of :func:`output_members` for
        more details.
    :param ts: if timestamp should be included in the output.
    """
    config = _get_configuration()
    if not cluster_names:
        if 'scope' in config:
            cluster_names = [config['scope']]
        if not cluster_names:
            return logging.warning('Listing members: No cluster names were provided')

    for _ in watching(w, watch):
        if ts:
            click.echo(timestamp(0))

        for cluster_name in cluster_names:
            dcs = get_dcs(cluster_name, group)

            cluster = dcs.get_cluster()
            output_members(cluster, cluster_name, extended, fmt, group)
Process ``list`` command of ``patronictl`` utility.

    Print information about the Patroni cluster through :func:`output_members`.

    :param cluster_names: name of clusters that should be printed. If ``None`` consider only the cluster present in
        ``scope`` key of the configuration.
    :param group: filter which Citus group we should get members from. Refer to the module note for more details.
    :param fmt: the output table printing format. See :func:`print_output` for available options.
    :param watch: if given print output every *watch* seconds.
    :param w: if ``True`` print output every 2 seconds.
    :param extended: if extended information should be printed. See ``extended`` argument of :func:`output_members` for
        more details.
    :param ts: if timestamp should be included in the output.
    
patroni/ctl.py