def get_clients_info(clients):
    """Returns the ids, hierarchies and num_samples for the given clients.

     Returns info about self.selected_clients if clients=None;

    Args:
        clients: list of Client objects.
    """

    ids = [c.id for c in clients]
    groups = {c.id: c.group for c in clients}
    num_samples = {c.id: c.num_samples for c in clients}
    return ids, groups, num_samples